Run UI / instrumentation tests on a local emulator instance.
- Add an AVD Manager Step. To customize the emulator, see the step configuration.
- Add a Wait for Android emulator step.
- Add a Gradle Runner step. Set the input variables:
- gradlew file path: for example,
./gradlew
. - Gradle task to run: for example,
connectedDebugAndroidTest
.
- gradlew file path: for example,
- Add a Export test results to Test Reports add-on Step with the following inputs:
- The name of the test:
Emulator tests
. - Test result base path:
$BITRISE_SOURCE_DIR/app/build/outputs/androidTest-results
. You might want to adjust the path based on the module name(s) in your project. - Test result search pattern:
*.xml
.
- The name of the test:
- 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.
- avd-manager@1: {}
- wait-for-android-emulator@1:
- gradle-runner@2:
inputs:
- gradlew_path: ./gradlew
- gradle_task: connectedDebugAndroidTest
- custom-test-results-export@1:
inputs:
- search_pattern: "*.xml"
- base_path: $BITRISE_SOURCE_DIR/app/build/outputs/androidTest-results
- test_name: Emulator tests
- deploy-to-bitrise-io@2: