Sauce Labs offers the ability to run automated tests on our real device cloud using UI Automator and Espresso, the native app testing framework for Android.
To begin, you'll need to download and configure our test runner, Sauce Runner for Real Devices, which is parameterized for use in your CI/CD environments. This will enable you to run tests against one or more devices in parallel, with test reporting that includes video, screenshots, and logs of your tests. As an alternative, you can also run Espresso and UI Automator tests from the Sauce Labs web interface.
What You'll Need
Requirements for using Espresso with Sauce Runner for Real Devices:
- Set up your mobile app testing project
- Have the .apk files for both your app and tests
Have Java 8 or later installed on your local machine
Download Sauce Runner for Real Devices
Click this link to download Sauce Runner for Real Devices, version 1.9 (.jar file).
NOTE: Currently, Espresso uses version 1.9; XCUITest uses version 1.8.
Configuring Sauce Runner for Real Devices for Espresso
See Command Reference for Sauce Runner for Real Devices for a list of options you can use to configure Sauce Runner to run tests with Espresso.