(Android) Run instrumentation tests on virtual devices
Description
Run instrumentation (for example, Espresso) or robo/gameloop tests on virtual devices. Our device testing solution is based on Firebase Test Lab. You can find the resulting logs, videos and screenshots on Bitrise.
Instructions
-
Add an Android Build for UI Testing Step. Set the input variables:
-
Project Location: Use the default
$BITRISE_SOURCE_DIR
or$PROJECT_LOCATION
. You can set a specific path but the automatically exposed Environment Variables are usually the best option. -
Variant: Use the
$VARIANT
Enviromment Variable, or specify a variant manually. -
Module: Specify one or leave it blank to run tests in all of the modules.
-
-
Add a Virtual Device Testing for Android Step. Set the input variables:
-
Test type: (or or )
-
(Optional) Test devices (default: ).
-
-
Add a Deploy to Bitrise.io Step that makes the test results available in the Test Reports add-on.
Potential issues with running instrumentation tests on virtual devices
You might encounter some unexpected issues while running instrumentation tests on virtual devices. You can find some examples and possible solutions in our Knowledge Base:
bitrise.yml
- [email protected]: inputs: - variant: $VARIANT - module: $MODULE - [email protected]: inputs: - test_type: instrumentation - [email protected]: {}