Confirmed users
372
edits
(remove v8 mentioning) |
|||
Line 1,069: | Line 1,069: | ||
</pre> | </pre> | ||
|} | |} | ||
==== Recording a tp6 test page ==== | |||
Test pages used for tp6 are mitmproxy recordings that are played back during the tp6 test (and ultimately loaded in Firefox via the local proxy). Each test page is a separate mitmproxy recording (*.mp) file, however all recordings for the tp6 suite are archived in a single zip file on tooltool. When tp6 is run, talos automatically downloads the mitmproxy recording archive for use during the test. | |||
The following process was used to record the tp6 mitmproxy page archives (on Windows 10): | |||
1. Install mitmproxy following the mitmproxy [http://docs.mitmproxy.org/en/stable/install.html installation instructions] | |||
2. Setup a local proxy in Firefox: | |||
* Start Firefox | |||
* Preferences => General | |||
* Network Proxy => Settings | |||
* On the "Connection Settings" screen, select "Manual proxy configuration" | |||
* For "HTTP Proxy" type in "127.0.0.1" with port "8080" | |||
* For "SSL Proxy" use the same "127.0.0.1" with port "8080" | |||
* Click the "OK" button to save the proxy settings | |||
3. Install the mitmproxy CA certificate: | |||
* Open a terminal window | |||
* Startup mitmproxy in host mode: | |||
mitmproxy --host | |||
* In Firefox, browse to "mitm.it" and follow the directions on how to accept the CA certificate | |||
* Shutdown the mitmproxy tool (in terminal hit "Q", then "Y" to quit) | |||
4. Record a new page: | |||
* Start Firefox with the proxy still enabled | |||
* Clear the browser history/cache | |||
* In a terminal window start the mitmdump recording tool: | |||
mitmdump -w /path/to/save/recording.mp | |||
* Inside Firefox browse to the URL that you want to record (i.e. www.spacex.com) | |||
* Wait for the page to be fully loaded and displayed | |||
* In the mitmdump terminal window press "ctrl + c" to stop the recording | |||
5. To test playing back your recorded page: | |||
* Start Firefox with the proxy still enabled | |||
* With mitmproxy NOT running, browse to your recorded URL (i.e. www.spacex.com); you'll just get an error saying that the proxy server is refusing connections | |||
* In a terminal window, start mitmproxy playback: | |||
mitmdump -k /path/to/save/recording.mp | |||
* In Firefox browse to the URL that you recorded already (i.e. www.spacex.com). This time the page will load successfully; it is actually loading the page from the local mitmdump archive file (*.mp) and not the external site | |||
* In the terminal window press "ctrl + c" to stop the playback | |||
6. When you're finished remember to turn off your Firefox proxy: | |||
* Preferences => General | |||
* Network Proxy => Settings | |||
* Select "No proxy" and click the "OK" button | |||
=== tpaint === | === tpaint === |