One time steps
- Install mitmproxy on your laptop [you can install either using brew or you can download the binary from https://mitmproxy.org/downloads/]
- Get the robustest.py file and place it in a separate folder
Pre-requisites
- Make sure you are able to access your device lab URL from your system
- Make sure that your mobile device can access your system's IP address
Running the proxy server to capture network data
- Run the following command
mitmdump -p 8888 -s ./robustest.py --set nerve_server={Device Lab URL including http/s}
Configuring the mobile device to send requests through the proxy
- On your mobile device, configure the WiFi connection for manual proxy and enter the following details
- Proxy server URL - the IP of your laptop
- Proxy server port - 8888
- Once configured, go to mitm.it from your phone's browser and download mitm certificate for your device platform
- For iOS devices, go to Settings -> General -> About -> Certificate Trust Settings. Enable the option Enable Full Trust for Root Certificates for mitmproxy
Running your tests
Once you are start running your tests, the network logs captured by mitmproxy will be stored in RobusTest and are accessible in the following ways
/v3/testsession/{testsessionID}/mitmproxy
/v3/appium/{appium_session_id}/mitmproxy
/v3/result/{result_id}/mitmproxy
Deprecated API routes
/v3/mitmproxy/testsession/{testsession ID}
/v3/mitmproxy/seleniumSessionID/{appium/selenium sessionID}
/v3/mitmproxy/result/{resultID}