- Getting Started with Selenium for Automated Website Testing
- Getting Started with Appium for Mobile Native Application Testing
- Selenium Bootcamp by Dave Haeffner
- Appium Bootcamp by Dave Haeffner and Matthew Edwards
Sauce Runner for Virtual Devices lets you run tests using the native testing frameworks like Espresso with virtual devices in the Sauce Labs testing cloud. This topic describes the required and optional command parameters you can use to set up your test runs.
The name of the test framework to use. Espresso is the only current supported option.
Your Sauce Labs username. You can also use the environment variable
Your Sauce Labs API key, which you can find under User Settings in the Sauce Labs interface. You can also use the environment variable
The local path or publicly accessible URL to the location of the application you want to test.
The local path or publicly accessible URL to the location of the test package you want to use.
The type of device you want to use with your test. You can specify two or more device arguments to run tests on multiple devices in parallel, and each device will execute the full test suite. You specify the type of device to use by setting the required
Optional parameter to run a subset of tests. You can provide a test filter to either exclude or include tests. By default the full test suite is executed.
|Optional parameter to specify a Sauce Connect Proxy tunnel to use with the tests.|
Optional parameter to specify a Sauce Labs datacenter
|Optional parameter to skip the download of the JUnit files at the end of the test suite.|
|Optional parameter to set the verbosity of console output. Valid options as |
|Print this command line reference to the console.|
|Version information for Sauce Runner.|
Exit Status Codes
Sauce Runner for Virtual Devices returns the following status codes based on test execution results.
|0||All the tests passed on all devices.|
This status code can mean multiple things, it is important to refer to the logs to identify the problem.
Example Using All Required Parameters for Espresso
This example tests the application
helloworld.apk simultaneously on two emulators, Galaxy S8 and Pixel, using the Espresso test suite
espresso-test-suite.apk on Sauce emulators and launches the Espresso test suite on both emulators at the same time. Sauce-Runner-Virtual exits when all the tests have completed. Sauce-Runner-Virtual exits with status code zero if all the tests passed, otherwise it exits with status code 1.