Documentation

Looking for something in particular?

Integrating with Sauce Labs Real Device

This support article provides information on Automation’s integration with Sauce Labs Real Devices for mobile testing.

Note: Automation users must connect to Sauce Labs Real Devices to continue testing their mobile applications. For more information, please see Sauce Labs Real Device Testing.

Sauce Labs provides comprehensive mobile app testing using real devices, emulators, and simulators for Android and iOS. In addition, teams can automate native, hybrid, and mobile web apps for complete coverage.

Configuring Sauce Labs Real Devices in Automation

Before configuring a Sauce Labs Real Device Mobile App in Automation, you should already have a Sauce Labs account with the appropriate resources to test a mobile app. Please refer to Sauce Labs’ documentation for more information on completing this setup.

Adding a Browser Provider

To configure a Sauce Labs Real Device Mobile App in Automation, first, add a new Browser Provider.

On the Test Settings section, click the Browser Providers tab. Click Add New (‘+’) icon.

Above: View of Browser Providers tab.

An Add New Browser Provider screen is displayed. In the Browser Provider section:

  • In the Name field, enter a browser provider name. 
  • In the Type field, select Sauce Labs Real Devices from the drop-down.

Above: Adding a new Browser Provider.

In the Connection Properties section:

  • In the Username field, enter the  Sauce Labs username to authenticate the user’s test account. 
  • In the Access Key field, enter the Sauce Labs access key to authenticate the user’s test account.
  • In the Data Center field, select the specific Sauce Labs data center where the desired device is located.

Adding a device

In the Devices section, click Add New (‘+’) icon to add a device. The Add Sauce Labs Real Device screen is displayed.

Note: The device list is retrieved from the selected Sauce Labs data center.

Above: Device list is retrieved from Sauce Labs.

In the Details section:

  • In the Device Type field, select the type of device from the drop-down e.g., Phone.
  • In the Platform Name field, select the platform from the drop-down e.g., iOS.

Note: Automation provides support for both iOS and Android. Selecting any of these as a Platform Name will alter the options in the subsequent field drop-downs.

  • Select the appropriate platform version from the drop-down in the Platform Version field.
  • In the Manufacturer field, select the manufacturer from the drop-down.
  • In the Device Type field, select the device from the drop-down.

In the Desired Capabilities section, click Add New (‘+’) icon to add a desired capability to the selected device. An Add New Desired Capability screen is displayed.

Above: Adding a new capability.

  • In the Name field, enter the desired capability name.
  • Select the Provar Test Environment in the Environment field where the desired capability must be applied.
  • In the Value field, enter the value of the desired capability.

Click OK to add the desired capability to the configured device. Once the device has been configured, add a Sauce Labs Real Device, as shown below.

Above: View of adding a Sauce Labs Real device.

Click OK to add a device and return to the Browser Provider details screen.

To check that the account credentials are correct and you can connect to the account with the credentials provided, click Test Connection to confirm the connection is established successfully. 

To complete adding the new Browser Provider, click OK, and the newly added Browser Provider connection is displayed in the Browser Providers tab.

Adding a Mobile App

To use the Sauce Labs Real Device connection, we now add a new Mobile App in Automation and configure it to use the new connection. 

On the Test Settings tab, click the Mobile Apps tab. Click the Add New (‘+’) icon.

An Add New Mobile App screen is displayed.

Above: Adding a new Mobile App.

In the Details section:

  • In the App Name field, enter the mobile app name. 

The earlier created Browser Provider name and type are displayed as a section within the screen: 

  • In the App Type field, select the app type from the drop-down.
    • Native – Enter or select the values for the additional fields required for this selection:
      • By Name – You can select this option if you know the app name. 
        • In the App Name field, enter the app name.
      • Available Apps – display a list of available apps from the Sauce Labs connection.
        • In the App field, select the app from the dropdown list. 
    • Browser – The test case will run on the native browser for the selected device (Chrome or Safari).

Configure a test case

Within a Salesforce Connection test step, in the UI Testing section, select the mobile app created in the previous steps in the Salesforce Application field.

Above: View of configuring a test case.

Running tests on Sauce Labs

To execute a test case using the Sauce Labs Real Device browser provider, select the new configuration we just created from the browser configuration dropdown on the toolbar.

Above: View of Sauce Labs Browser Provider.

When the test case is ready to run, execute Run mode or Debug mode

Above: View of Run and Debug modes.

On the Test Runner tab, you can see the test case progress. 

To view the test result in Sauce Labs, login to your account to access the Sauce Labs dashboard, and click Automated > Test Results from the left-hand side menu.

Above: View of the test result in Sauce Labs.

Run Under ANT

The Run Under ANT option is also available to run the test cases for the Sauce Labs Real Device that we added to Provar Browser Providers. 

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top