Network logs

Network Logs capture performance data such as network traffic, latency, HTTP requests and responses in the HAR (HTTP Archive) format. You can download network logs using both the App Automate dashboard, as well as using our REST API. You can visualise HAR files using a HAR Viewer.

Network Logs are disabled by default. To enable network logs, you need to pass the networkLogs parameter in the REST API request to start Espresso test execution. An example cURL request to enable network logs is shown below :

REST API endpoint :

POST /app-automate/espresso/v2/build
Parameter Description Values
networkLogs Capture network logs during Espresso test execution. true, false
Default: false

Example cURL request:

Enable network logs for an Espresso test execution :

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"networkLogs": true, "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"

View network logs on the dashboard:

You can download network logs using the Network Logs tab on the test details page of App Automate dashboard. Sample network logs are shown below :

Sample network logs of a session

Import network logs using REST API:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/builds/<build-id>/sessions/<session-id>/networklogs"
Note:
  1. You may experience minor impact on test execution speed when Network Logs are enabled.
  2. Certain apps such as Play Store, App Store, TestFlight etc. might not work on all OS versions when network logs are enabled.
  3. Network logs will not be available if allowDeviceMockServer is set to true.

We're sorry to hear that. Please share your feedback so we can do better







Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better







Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert