Run unit tests (for example, testDebugUnitTest
).
- Add an Android Unit Test Step. Input variables you might set:
- 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.
- Project Location: Use the default
- Add a Deploy to Bitrise.io - Apps, Logs, Artifacts Step that makes the test results available in the Test Reports add-on. The failed tests will be also available under the
Test Results
tab on the build details page.
- android-unit-test@1:
inputs:
- project_location: $PROJECT_LOCATION
- variant: $VARIANT
- deploy-to-bitrise-io@2: {}