Document toolboxDocument toolbox

Execution on Sauce Labs Real Device-TestObject

Introduction

The Sauce Labs Real Device-TestObject provides you the ability to run Qualitia test cases across Android and iOS physical devices. With its Web interface, you can run tests using different combinations of platforms, platform versions, and browsers. In this environment all Qualitia mobile application tests are executed on physical devices. Sauce Labs allows you viewing video recordings of the test case executions.

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.


In this section

Mandatory Settings and Execution Guidelines 

Mandatory Execution Guidelines:

  1. During the execution, you must upload the mobile application manually into the TestObject storage through their Cloud UI.
    For more information, refer to https://wiki.saucelabs.com/display/DOCS/Uploading+and+Accessing+Applications+with+Real+Devices
  2. Clear the APK path from the associated parameter of Mobile.OpenApp Action. 

Settings in the Associated Execution Profile:

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

Do the following in the order listed:

  1. From the Environment list, select as Cloud.
  2. From the Cloud Platform list, select TestObject.
  3. Select the Edit Desired Capabilities checkbox.
  4. Select or enter the following values:
  • URL
  • Username
  • Accesskey
  • Devicename
  • testobject_api_key
  • test_app_id
  • For testing on a native app, select nativeWebScreenshot as True.
  • For testing on an iOS application, select an Appium Version.

Additional Recommendations:

  • In the Execution Parameters tab, select ScreenCaptureMode as Browser.


Creating a Real Device Project

In order to automate testing on Sauce Labs Real Device, you must create a project on TestObject. When creating a project, you provide information about the type of application to test (Web or Mobile app) and the device settings you want to use in your tests. After creating a project, you will get a testobject_api_key (for example: 1234567890123456789012345678901234567890). You will have to add this key in testobject.properties against to.testobject_api_key property.

For more information about creating the project for Sauce Labs Real Device testing, refer to the Sauce Labs documentation.



Viewing Test Case Execution and Reports 

Once you trigger the offline package execution, you can view the status of your ongoing executions in Appium Test Results section. Each Test or Suite appears as a single grid with details like device, time, and duration of the test execution against it. Click the test case name from the list to view detailed logs, video recordings, and so forth of the test case.

To view the execution report of Qualitia test cases:

  1. Log on to your Sauce Labs real device instance.
  2. From the top, click  > Appium.
  3. In the Appium Test Results section, click the test case from the list.
    Here you can view the Test case Info, Screenshots, Video, Requests, Device Logs and Appium Logs.