Skip to main content

Setting Up Backtrace for your Real Device Tests

Detecting errors and crashes and resolving them early on is key to the success of your app.

After you’ve completed the steps on this page, errors and crashes associated with your real device tests (automated or live) will be available for you in Sauce Labs.

Supported Platforms

Supported PlatformsSupported SystemsSupported Features
Real devicesAndroidErrors and Crashes

Crashes for iOS apps are not supported when running real device tests in Sauce Labs with Backtrace.

What You'll Need

  • A Sauce Labs account (log in or sign up for a free trial license).
  • A Backtrace account (log in or sign up for a free trial license).
  • Your subdomain name (used to connect to your Backtrace instance). For example,
  • A Backtrace project and an API token with object:get and query:post capabilities.
Generate an API Token
  1. In the Backtrace Console, go to Project settings > API tokens.
  2. Click New.
  3. Select the object:get and query:post capabilities.
  4. Click Create.

Create Custom Attributes

Custom attributes are required to link the correct errors and crashes that occurred on the selected device and for the duration of the test.

The following custom attributes are required:


To add the attributes:

  1. In the Backtrace Console, go to Project settings > Attributes.
  2. Click +.
  3. Enter the values for the required fields.
  4. Click Create.
  5. Repeat steps 2 to 4 for each required attribute.

For more information about attributes, see Indexing Attributes.

Integrate the Backtrace SDK

To integrate the Backtrace SDK with your Android app, see Setting Up Backtrace for Android.

Enable the Backtrace Integration in Sauce Labs

This enables the Backtrace integration for all users in your organization. Once enabled, only organization admins can update the settings or disable the integration.


The Backtrace integration is specific to the data center that is active for your Sauce Labs account during setup. If you have access to multiple data centers, you must switch into each data center and complete the steps below to integrate Backtrace.

  1. From your Sauce Labs account, go to the Test Results details page (live or automated) for a real device.
  2. From the bottom of the screen, select the Error & Crash Reporting tab.
  3. Click Link with Backtrace.
  4. Enter the Project Name, Dashboard URL, and API Token.
  5. Click Save.

If you are an organization admin, you can also enable the Backtrace integration from the Integrations page.


Only one subdomain, project, and API token is supported per organization.

Run your Real Device Test

Throw an error or a crash to test your mobile app.

For information on how to run your real device test (live or automated), see Mobile App Testing.

View Test Results in Sauce Labs

After running a real device test with the Backtrace SDK integrated into your Android or iOS app, you can view errors and crashes in Sauce Labs.

  1. Go to the Test Results details page (live or automated) for a real device.
  2. From the bottom of the screen, select the Error & Crash Reporting tab.

View Errors and Crashes in Backtrace

From the Error & Crash Reporting tab, click any link to view more details (View Errors, View Crashes, Backtrace Dashboard) in the Backtrace Console.

For more information about how to view and analyze error and crash data in Backtrace, see Web Console Getting Started.