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.
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.
- By Name – You can select this option if you know the app name.
- Browser – The test case will run on the native browser for the selected device (Chrome or Safari).
- Native – Enter or select the values for the additional fields required for this selection:
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.
- Provar Automation
- System Requirements
- Browser and Driver Recommendations
- Installing Provar Automation
- Updating Provar Automation
- Licensing Provar
- Granting Org Permissions to Provar Automation
- Optimizing Org and Connection Metadata Processing in Provar
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Consolidating Multiple Test Execution Reports
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Functions
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Japanese Language Support
- Override Auto-Retry for Test Step
- Mapping and Executing the Lightning Article Editor in Provar
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Automation
- Provar Test Builder
- ProvarDX
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Reporting
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript Locator Support
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- ProvarX™
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Provar Manager
- How to Use Provar Manager
- Provar Manager Setup
- Provar Manager Integrations
- Release Management
- Test Management
- Test Operations
- Provar Manager and Provar Automation
- Setting Up a Connection to Provar Manager
- Object Mapping Between Automation and Manager
- How to Upload Test Plans, Test Plan Folders, Test Plan Instances, and Test Cases
- Provar Manager Filters
- Uploading Callable Test Cases in Provar Manager
- Uploading Test Steps in Provar Manager
- How to Know if a File in Automation is Linked in Test Manager
- Test Execution Reporting
- Metadata Coverage with Manager
- Provar Grid
- DevOps
- Introduction to Provar DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Version Control
- Masking Provar Credentials on CI
- Salesforce Testing
- Best Practices
- Improve Your Metadata Performance
- Java 21 Upgrade
- Salesforce Connection Best Practices
- Testing Best Practices
- Automation Planning
- Supported Testing Phases
- Provar Naming Standards
- Test Case Design
- Create records via API
- Avoid using static values
- Abort Unused Test Sessions/Runs
- Avoid Metadata performance issues
- Increase auto-retry waits for steps using a global variable
- Create different page objects for different pages
- The Best Ways to Change Callable Test Case Locations
- Working with the .testProject file and .secrets file
- Best practices for the .provarCaches folder
- Best practices for .pageObject files
- Troubleshooting
- How to Use Keytool Command for Importing Certificates
- Installing Provar After Upgrading to macOS Catalina
- Browsers
- Configurations and Permissions
- Connections
- DevOps
- Error Messages
- Provar Manager 3.0 Install Error Resolution
- Provar Manager Test Case Upload Resolution
- Administrator has Blocked Access to Client
- JavascriptException: Javascript Error
- macOS Big Sur Upgrade
- Resolving Failed to Create ChromeDriver Error
- Resolving Jenkins License Missing Error
- Resolving Metadata Timeout Errors
- Test Execution Fails – Firefox Not Installed
- Selenium 4 Upgrade
- Licensing, Installation and Firewalls
- Memory
- Test Builder and Test Cases
- Release Notes