App Logs is a functionality that provides you with a detailed view of logs for your mobile apps. This feature provides you with visibility into events, errors, and warnings that occur during testing, making it easier to troubleshoot and diagnose issues.
What You'll Need
- A Sauce Labs account (Log in or sign up for a free trial license)
- A native Android, iOS, or iPadOS mobile app
- Instrumentation enabled.
Accessing App Logs for Real Devices
To access the App Logs, follow these steps:
On Sauce Labs, click Live > Test Results.
Click on the device name for the test session that needs debugging.
Click the Logs tab and select device.log from the drop down menu.
The App Logs feature includes different log types, such as errors, warnings, infos, and verbose Logs. Each log type provides a different view of the application logs, allowing you to filter and focus on specific types of information.
You can use the regrex functionality to analyze your logs.
Downloading the App Logs
You can download the App Logs as a text file to save and share with Sauce Labs support for further analysis. This feature allows you to keep a record of the App Logs and use them for future reference or troubleshooting:
You can also download the results using the API call below and send it to your development team:
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/v1/rdc/jobs/8ed051b303b4414f861e88eeb1732d02/deviceLogs' | json_pp
- The feature works only with instrumentation enabled.
- Emulators and Simulators are not supported.
- On Sauce Labs, in the left navigation, click App Mangement.
- Upload your mobile app to Sauce Labs.
- After you’ve uploaded your app, hover your mouse over your app, then select Settings.
- Under Real Device Settings toggle Instrumentation to Enabled.