Tosca Integration
Tricentis Tosca is an industry-leading test creation tool, allowing for rich test case automation against web, mobile, and client-server applications. When you need to execute a lot of Tosca tests in parallel, look to Sauce Labs to help you scale.
Overview
Tosca scans your app to gather data about the various pages and elements. From the model Tosca creates, you will piece together sequences of actions, allowing you to script the steps your test will execute. With the Sauce Labs credentials in place, you then choose the platforms you want to execute on. See the Platform Configurator for more information.
What You’ll Need
- A Sauce Labs account (Log in or sign up for a free trial license).
- Your Sauce Labs Username.
- You’ll also need to download and install Tosca.
Scanning an App
- In the Tosca Commander, on the Modules tab, click Scan and then click Mobile.
- In the Add connection box, enter your Sauce Labs credentials.
- In the Add device box, enter the information for the Sauce Labs device you will be using.
-
Upload your application file (.ipa, .aab, or .apk) to the Sauce Labs cloud (for details, see Mobile App Storage).
-
When you receive an id for the file location, in the Edit native/hybrid application box, enter the path with the following format and then click Save:
storage:filename=app-<app_name>
or:
storage:file_id=<file_id>
- In the Establishing connection... box, click Scan.
This step sometimes takes a considerable amount of time, due to the large volume of data flowing back and forth between Tosca and the Sauce Labs cloud. Running such a scan locally (on an emulator) may speed up the process, and is the recommended practice.
Executing a Test
Once you have some basic tests created, it’ll be time to execute them. For parallel execution of multiple tests on Sauce Labs devices, you’ll need to fill out the test configuration fields as indicated below.
- In the Tosca Commander, on the Execution tab, enter your Sauce Labs credentials.
- On the Test Cases tab, in the Application field under Open Mobile App, enter the
storage:filename
.
- For a real device, execute the script by adding the following configuration:
- For a virtual device, execute the script by adding the following configuration: