Changes

Jump to: navigation, search

TestEngineering/Performance/Raptor/Mitmproxy

1,378 bytes added, 20:52, 24 January 2019
Add first part of how to record on android
/home/cltbld/tasks/task_1541153570/testing/raptor/mitmdump -k -q -s /home/cltbld/tasks/task_1541153570/build/tests/raptor/raptor/playback/alternate-server-replay.py /home/cltbld/tasks/task_1541153570/testing/raptor/facebook.mp
== How to Record a Mitmproxy Test Page on Firefox Desktop ==
Test pages used for Raptor pageload tests (i.e. raptor-tp6, raptor-gdocs) are mitmproxy recordings that are played back during the test (and ultimately loaded in Firefox via the local proxy). Each test page is a separate mitmproxy recording (*.mp) file, and all the page recordings for each suite are contained in a single zip for that suite (i.e. mitmproxy-recordings-raptor-tp6.zip) on tooltool.
7. Be sure to use Mitmproxy (mitmdump) to playback your new page recording and verify with inspector that the hero element was added successfully (and only once - if there are other elements with the same id then the hero element could be added to multiple elements by mistake).
 
== How to Record a Mitmproxy Test Page on Android ==
 
For Raptor page-load tests that run on android (i.e. tp6m-1) the mitmproxy recordings were actually made on an android device (Google Pixel 2) with the geckoview example app.
 
Recording a mitmproxy page on android is very similar to desktop except it's easier to run an existing android page-load test (i.e. tp6m-1) first to get the device setup before recording. Also you need to `adb reverse` a port so the device can access mitmdump running on the host machine. Here's how to create a mitmproxy recording using the android geckoview example app:
 
1. Ensure your android device (i.e. GP2) is already setup to run Raptor on the geckoview example app, see [[https://wiki.mozilla.org/Performance_sheriffing/Raptor#Running_on_the_Android_Geckoview_Example_App|Running Raptor on the Geckoview Example App]]
 
2. In order to get mitmdump installed on your host machine, and the android device ready to record (i.e. the mitmdump CA certificate installed in the geckoview example app, proxy turned on, etc) run the Raptor tp6m-1 test. With your android device attached to USB, run:
 
mozilla-central$ ./mach raptor-test --test raptor-tp6m-1 --app=geckoview --binary="org.mozilla.geckoview_example" --page-cycles 1
 
Wait for that to finish. The geckoview example app will remain open on the device.
 
3. TODO
Confirm
372
edits

Navigation menu