Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Introduction

Sauce Labs is a 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.

To know more about Sauce Labs click here.

Also, before uploading an iOS native or hybrid application, ensure that you build the application by following the below Saucelabs guidelines:

Prior to starting offline execution on Sauce Labs, ensure that you have:

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

After logging to Sauce Labs, click Data Center located at the top-right corner, and select the Time Zone to USE West 1.




In this section

Mandatory Settings in Qualitia

You must create execution profiles that are solely used for execution on Saucelabs platform from Qualitia Client or offline package. In those execution profiles, you must define the settings that are mandatory for test suite execution.

Mandatory Settings in the Associated Execution Profile

Do the following in the order listed:

  1. From the Environment list, select as Cloud.
  2. From the Cloud Platform list, select Sauce.
  3. Select the Edit Desired Capabilities checkbox
  4. Select or enter the following values: 
  • Url
  • username 
  • accesskey
  • For testing on a desktop web application, select usew3c as True.
  • For testing on a mobile application,
    • Enter the Platform Version only and do not edit the default value for the Native Object sync time. 
    • All the remaining values must be blank.
    • For iOS mobile application, ignore value present in Appium Server URL as it is mandatory field. It is not used in the execution.
  • For testing on a mobile hybrid application, select nativeWebScreenshot as True.
  • For testing on an iOS native or hybrid application, perform the following actions:
    • From the automationName drop-down, select XCUITest.
    • Enter the latest Appium version number as the appiumVersion.

Additional Recommendations:

In the Execution Parameters tab, select ScreenCaptureMode as Browser.

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 associated execution profile 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 Behind Firewall (on Private Networks)

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 sc.exe file some machine in the private network to allow Sauce executing tests flawlessly.

Executing this sc.exe will create a tunnel allowing sauce to execute test cases in the private network. 

To execute applications of private network on Sauce:

  1. Open the associated execution profile.
  2. Under Edit Additional Capabilities, set the desired value for slw.tunnelIdentifier.
    The value set here for this key will be required when executing sc.exe in step 6. For more information on configuring this property, refer Sauce Labs documentation.
  3. Download the Sauce Connect Proxy on any machine in the network using following url: 
    https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy
  4. Extract the folder at the suitable location.
    You will find the sc.exe file in the bin folder.
  5. Open Command Prompt and navigate to the folder where sc.exe file exists. 
  6. Enter the following command.

    sc -u <sauce_username> -k <accesskey> -i <tunnelID>
    For example: sc -u john.doe -k 8becc95c-4559-4582-a617-7d38544797a2 -i tunnel-1232
  7. Press Enter.

Once the SC.exe 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 /wiki/spaces/T2/pages/1381634806 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.

Execution using W3C Protocols

W3C-compliant Selenium capabilities and protocol is supported for test case executions in the Sauce Labs environment with selenium v3.11.0 and above.

This W3C protocol is supported while executing test cases using following browser versions:

  • Internet Explorer v11 and above,
  • Mozilla Firefox v53 and above, and
  • Google Chrome v 61 and above.

Here is the list of capabilities which you need to modify when you want to execute test cases using W3C protocol. 

slw.useW3C=True
browser=Firefox, Chrome, or Internet Explorer)
version=(for firefox, 53 and above, for chrome 61 and above, for IE 11 and above)
seleniumVersion=3.11.0

For more information about executing test cases using W3C-Protocols and Capabilities, refer to the Sauce Labs documentation

  • No labels