Changes

Jump to: navigation, search

TestEngineering/Performance/Raptor/Mitmproxy

237 bytes added, 16:37, 2 November 2018
m
Adding Hero Elements improvement
Since Raptor uses Mitmproxy to playback web pages, in order to use hero elements they must be manually added to the web page archive. Tarek created a script ('[https://github.com/tarekziade/mitmflow mitmflow]') to add hero elements to existing Mitmproxy page recordings. See the [https://github.com/tarekziade/mitmflow mitmflow repo] for more information, but the basic steps to add a hero element to an existing Mitmproxy page archive are:
1. Startup Firefox, turn on Copy [https://github.com/tarekziade/mitmflow/blob/master/replace.py Tarek's mitmflow replace script] into the proxysame folder where you have the mitmdump binary.
2. Use Mitmproxy Startup Firefox, turn on the proxy (mitmdumpsee settings above) to playback the web page recording of the page you wish to add the hero element to.
3. Use Mitmproxy (mitmdump) to playback the Firefox dev tools web page inspector and find an element in recording of the test page where you wish to add the hero element. It should be a unique element like a picture, something with a unique id to (see above for examplemitmdump playback command line syntax).
4. Update Use the Mitmproxy replacement script accordingly to indicate which Firefox dev tools page inspector and find an element in the test page where you want wish to add the hero element to. It should be a unique element like a picture, something with a unique id for example.
5. Update the Mitmproxy replacement script accordingly to indicate which element you want to add the hero element to. 6. Use Mitmproxy (mitmdump) to read your page recording, run it through the Mitmflow replace script, and write out a new Mitmproxy page recording with the element having been added. i.e. with Mitmproxy 2.x:
./mitmdump -dd -s "./replace.py" -r /Users/rwood/Desktop/recordings/google.mp -w /Users/rwood/Desktop/recordings/google-hero.mp
67. 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).
Confirm
372
edits

Navigation menu