Document toolboxDocument toolbox

Header

(8.3.1) 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.

Mandatory Settings and Execution Guidelines 

Mandatory Execution Guidelines:
You must upload your mobile application under test in TestObject. which generates a unique app_path for your mobile app.
For more information, refer to https://wiki.saucelabs.com/display/DOCS/Uploading+and+Accessing+Applications+with+Real+Devices

To upload a mobile application in TestObject and get the unique app_path:

  1. Open https://app.saucelabs.com/live/app-testing.
  2. Click App Upload > Choose File to upload the mobile application from your computer.
    The application name appears.
  3. Mouseover the application name.
  4. Click Settings.
  5. Copy the File_id that is generated.
  6. Form an app path in the format,as storage:File_id.
  7. Enter the value of app_path in the first parameter for all the Mobile.OpenApp actions present in different test cases, which are planned for execution on TestObject.  Or, use an environment variable for the app_path value.

Settings in the Associated Execution Profile:

You must create execution profiles that are solely used for execution on the Browserstack platform from the Qualitia Client. In those execution profiles, you must define the below 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
  5. To test on a native app, select nativeWebScreenshot to True.
  6. To test 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.

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

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.

Footer