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:
- Open https://app.saucelabs.com/live/app-testing.
- Click App Upload > Choose File to upload the mobile application from your computer.
The application name appears. - Mouseover the application name.
- Click Settings.
- Copy the File_id that is generated.
- Form an app path in the format,as storage:File_id.
- 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.
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:
- From the Environment list, select as Cloud.
- From the Cloud Platform list, select TestObject.
- Select the Edit Desired Capabilities checkbox.
- 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.
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:
- Log on to your Sauce Labs real device instance.
- From the top, click > Appium.
- 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.