1. Webpagetest is an online Browser execution service used to test web pages. You can review this free service at [login to view URL]
2. The reference to the REST-API for public and private instances can be found here: [login to view URL]
2. You will write a wrapper module for Web Page Test ( that has the following features:
1. Make a single class that can fetch a set of JSON results from a given web-page-test URL
1. Initializing the class should take a single parameter, the API key. You can register for your own developer key here: [login to view URL]
2. Ensure that each function within your class has proper Pytest-enabled unit tests, which allow verification of operation
3. Assume all default parameters are currently sufficient - don’t worry too much about having to support multiple parameters other than API key and URL to test.
2. Write a method “get” that fetches the results from a successful scan (not just the results from a submission). This should be a valid JSON data object or None. Ensure that you have at least one unit and end-to-end test for this method.
1. Be careful about understanding the difference between submitting a job to Web Page Test and getting the results from a finished job. “Get” method should return the results from a finished scan as a JSON .
3. Create a method called “get_async” that uses python asynchronous co-routines to perform the same actions as the “get” method. Async / Await patterns preferred here. Verify using at least 1 unit test.
4. Once the “get_async” method works, instantiate the class and enable the get method to be called using a multi-threaded pattern. Call the method “get_parallel”
1. Input will be an array of URLs,
2. Use the same logic from b and c above,
3. This should support up to 10 parallel ‘get’ calls being made at the same time asynchronously
4. Write a unit test to verify parallel thread execution
5. Make sure all proper exception handling is in place so that if something fails (network failure, etc) it deals with the failure gracefully (without crashing)