Document toolboxDocument toolbox

A new version of Qualitia Automation Studio for Web and Mobile 7.2.x is now available. We highly recommend you upgrade. Find more details here.

Execution on Sauce Labs

The Sauce Labs is cloud environment which allows users to run tests in the cloud using different combinations of operating systems, browsers, and browser versions. In this environment all tests are executed on Sauce Labs VM. You can view the ongoing suite execution on Sauce Lab's Dashboard.

It is recommended to set ScreenCaptureMode value as Browser when the execution environment is Sauce or Remote.

You can set the value for FailStepOnBrowserScreenshotFailure as per the test case requirements (as true or false) to behave when the application under test generates any run-time Alert / Windows.

To know more about Sauce Labs click here.

Prior starting offline execution on Sauce Labs, ensure you have;

  • An active account with valid user name / password and
  • Sufficient balance of execution hours.

Configuration Settings

In order to execute test cases using Sauce Labs, you need to configure the qualitia.properties file accordingly. 

To execute the offline package using the Sauce Labs environment:

  1. Open the qualitia.properties file from the config folder of offline package.
  2. Set ExecutionEnvironment as Sauce.
  3. Set DefaultWebExecutionPlatform as follows:
    1. If you are testing desktop application, set it as Desktop or
    2. If you are testing mobile application, set it as Mobile

When the Application under Test is desktop application and you want to execute the offline package in Sauce Labs environment, you need to configure the sauce.properties file accordingly.
To update the sauce.properties file:

  1. Open the sauce.properties file.
  2. Set properties "custom_username", "custom_accesskey" to valid values with reference to Sauce Lab's active user account.
  3. Set "platform", "browser", and "version" to corresponding OS, browser, and browser version you want your offline package to execute on.
    For example, if you want your offline package to execute on Internet Explorer 11 on OS Windows 8.1 then set keys as follows:
    • platform=Windows 8.1
    • browser=Iexplore
    • version=11

If you are providing these values through command line, each value should be provided within double quotes if values are containing spaces; otherwise, the spaces in values will result in inconsistencies. For example, java -jar Qualitia-Offline-xxx.jar platform="Windows 8.1".

For more information on platforms, browsers, browser versions supported on Sauce, please refer https://saucelabs.com/platforms/.

If you do not set these values against platform in the Sauce.properties file, all your test cases will be executed on Linux. Also, if you do not specify the version, test cases will be executed using the latest version of browsers.

When the Application under Test is mobile application and you want to execute the offline package in the Sauce Labs environment, you need to configure the saucemobile.properties file accordingly.

To update the saucemobile.properties file:

  1. Open saucemobile.properties file.
  2. Set properties "custom_username", "custom_accesskey" to valid credentials with reference to Sauce Lab's active user account.
  3. Set "Browsername", "Devicename", "Platformversion", "appiumVersion", "deviceOrientation" and so forth to corresponding browser, device, platform, Appium, and Orientation of device you want your offline package to execute on. For example, if you want to execute your offline package on Samsung Galaxy S4 Device that has Android 6.0 operating system using Appium version 1.6.4, then set keys as follows:
    • Browsername=[Keep it blank for native application or specify the browser name for Web applications]
    • DeviceName=Samsung Galaxy S4 Device
    • Platformversion=6.0
    • appiumVersion=1.6.4
    • DeviceOrientation=Portrait

Users should not specify UDID when executing test cases on mobile devices on Sauce Labs.

  • For more information about property possible values, refer the saucemobile.properties file.
  • You can use the Platform Configurator maintained by Sauce Labs to get the exact values of properties to set in the configuration files. Open Platform Configurator, select the properties based on which you want to configure your device on Sauce Labs and you will find the list of properties to be set in the configuration file at the end of page.
  • If you are providing these values through command line, each value should be provided within double quotes if values are containing spaces; otherwise, the spaces in values will result in inconsistencies. For example, java -jar Qualitia-Offline-xxx.jar platform="Windows 8.1".
    For more information on platforms, browsers, browser versions supported on Sauce, please refer https://saucelabs.com/platforms/.
  • If you do not specify the version of browsers, test cases will be executed using the latest version of browsers.


4. Set the "custom_mobileAppPathType" as follows:

  • When the application is to be uploaded from local drive, set it to Upload or
  • When the application is to be taken from public URL such as Google Drive, DropBox, set it to PublicURL.

Once all the configuration settings are done successfully, you can now execute test cases on Sauce Labs.

Executing Offline Package

You can execute the offline package following traditional method of offline execution.

For more information on execution of offline package, please refer to the Offline Package - Execution section.

Values you provide in the sauce.properties file can also be provided using command line. You can set the sauce properties using three different sources as mentioned below.

Sauce.properties

It is a set of default Sauce properties file. You can always use this file to define your own set of properties.

User Defined Sauce Properties

Qualitia users can create their own properties file for Sauce Labs, which includes all the Sauce Labs properties. This file can be used by providing command line arguments accordingly when executing offline package.
For example: java -jar qualitiaoffline-x.x.x.jar saucelabsfilename="D:\\SauceLabsData
Saucelabs_version01.properties"

Command Line Arguments

Qualitia allows providing Sauce properties as command line arguments. For example, java -jar qualitia-offline-xxxx.jar custom_username=<<sauce user name>> platform=MAC recordVideo=false

Viewing Current Execution on Sauce Lab's Dashboard

Once you have triggered the offline execution, you can view the status of your ongoing executions on the Sauce Lab's Dashboard. Each test case appears on dashboard as a single job with execution status against it. All the test cases are taken one by one by the sequence they are arranged in Suite. The status is updated after each test execution is completed on Sauce Lab environment with its status (fail / pass) against it. You can view the execution of test case clicking the current job on Dashboard.

You can record your test case execution configuring the sauce.properties file accordingly.

Set the recordVideo value as true and all the test case executions will be recorded.

You can download these videos once the test execution is completed from the Metadata tab. The video contains the execution of all the test cases available in Suite as the value set against QualitiaExecMode in the qualitia.properties file is PS (refers to per suite).

Execution Reports

Test execution reports are launched on the machine from where the execution was triggered after the test case execution is completed. You can also download the video of test case execution from the Metadata tab.

Execution of Tests Running on Firewall Applications

Few applications are configured to be accessed using private networks. Such applications deny access when they are being accessed from other than local networks and so from Sauce Lab. Executing test cases on Sauce for such applications needs special configurations.

You need to execute the Sauce-Connect.jar file on the machine in the private network to allow Sauce executing tests flawlessly.

To execute applications of private network on Sauce:

  1. Download the Sauce connect zip on any machine in the network using following url: https://saucelabs.com/downloads/Sauce-Connect-3.1-r32.zip
  2. Unzip the folder.
  3. Open Command Prompt and navigate to the Sauce-connect.jar file followed by Sauce Username and Access key.
    For example, <Location of the jar file>java -jar Sauce-Connect.jar parvinm ab8fa4d8-8c1f-4904-8353-b6074fc744fb
  4. Press the Enter button.

Once the Sauce-Connect.jar file is executed successfully, you can execute your Offline tests on Sauce environment using the same method mentioned above.

Execution using Browser Capabilities

You can also execute test cases on remote environment using selenium supported Browser Capabilities.

For more information on this, please refer to the Execution using Browser's Capabilities section.

Executing Test Cases on iOS Devices

If you are executing test cases on iOS mobile devices using Sauce Labs, you need to configure settings in the iosdc.properties file accordingly.

  • If iOS device is 9.3.x and below, automationname should be Appium or
  • If iOS device is 10.0.x and above, automationname should be XCUITest.

Not finding what you need?