Changes

Jump to: navigation, search

TestEngineering/Performance/Raptor/Mitmproxy

2,543 bytes added, 21:10, 24 January 2019
How to Record a Mitmproxy Test Page on Android finished adding
Wait for that to finish. The geckoview example app will remain open on the device.
3. TODOOn the android device turn on and connect Wifi. 4. In your terminal, change into the obj../testing/raptor folder, that is where mitmdump is located, i.e.:  Roberts-MacBook-Pro-1927:mozilla-unified rwood$ cd obj.../testing/raptor 5. ADB reverse the port so that the android device can talk to the mitmproxy server on the host, by running this command in a terminal:  adb reverse tcp:8080 tcp:8080 6. On the android device in the geckoview example app, browse to "about:blank". 7. From within the obj../testing/raptor folder, startup mitmdump recording and specify the path and name for the new recording file, i.e.:  Roberts-MacBook-Pro-1927:raptor rwood$ ./mitmdump -w "/Users/rwood/mozilla-unified/obj-ff-dbg/testing/raptor/new-mobile-recording.mp" 8. With recording running, on the geckoview example app browser to the <new recording's https mobile url> that you wish to record. Wait for the page to load and display fully in the geckoview example app, then in the terminal where mitmdump is running press `ctrl + c` to stop the recording. To test the new mobile recording: 1. Leave the new recording in the obj../testing/raptor dir, and add a section in the tp6m-1 test INI: [raptor-tp6-new-mobile-recording-geckoview]page_cycles = 15apps = geckoviewtest_url = <new recording's https mobile url>playback_recordings = new-mobile-recording.mpmeasure = fnbpaint, fcp, dcf, ttfi, loadtime 2. Turn Wifi OFF on the android device. 3. In your terminal change back into the root of your repo i.e. \mozilla-central\ and run the modified tp6m-1 on geckoview with the command:  mozilla-central$ ./mach raptor-test --test raptor-tp6-new-mobile-recording-geckoview --app=geckoview --binary="org.mozilla.geckoview_example" Watch the test run on the android device and verify that the test page is loaded correctly in the geckoview example app. Wait for Raptor to finish and report the results - verify that all of the measurements were successfully retrieved. Recording behind a login: If you need to make a recording of a page on android that is behind a login, follow the same process as above, except first start recording to a DUMMY.mp file name - with that running browse to the site's home page and login. Let it fully load, dismiss any pop-ups etc, and then stop the dummy recording. Then change to about:blank. Then start recording again, this time to the REAL .mp file name. Browse to the mobile site in geckoview example app, let it fully load (it's already logged into the site) and then stop recording.
Confirm
372
edits

Navigation menu