Device logs
Device logs are system logs specific to your application generated by Android logcat
. They can help you access your application logs and are especially helpful if the application under test crashes during test execution.
Device logs are available on the BrowserStack dashboard for 30 days. These logs will be deleted after 30 days from the day they were generated.
Device logs are disabled by default. To enable device logs, you need to pass the deviceLogs
parameter in the REST API request to start Maestro test execution. An example cURL
request to enable device logs is shown below :
REST API endpoint for Android:
POST /app-automate/maestro/v2/android/build
REST API endpoint for iOS:
POST /app-automate/maestro/v2/ios/build
Parameter | Description | Values |
---|---|---|
deviceLogs |
Capture device logs during Maestro test execution. |
true , false Default: false |
Example cURL
request :
Enable device logs for an Maestro test execution:
curl -u "username:accesskey" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/android/build" \
-H "Content-Type: application/json" \
-d '{
"deviceLogs": true,
"devices": ["Samsung Galaxy S8-7.0"],
"app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4",
"testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"
}'
Import device logs using REST API:
curl -u "username:accesskey" \
-X GET "https://api-cloud.browserstack.com/app-automate/maestro/v2/builds/<build_id>/sessions/tests/<test_id>/devicelogs"
View device logs on the dashboard:
On the test details page of App Automate dashboard, you can view device logs for each executed test case :
For information on supported APIs, refer to our REST API reference page.
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
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!