This step runs your Android project's unit tests.
Description
This step runs your Android project's unit tests.
Add this step directly to your workflow in the Bitrise Workflow Editor.
You can also run this step directly with Bitrise CLI.
Inputs
Key | Description | Flags | Default |
---|---|---|---|
project_location |
The root directory of your android project, for example, where your root build gradle file exists (also gradlew, settings.gradle, etc...) | required | $BITRISE_SOURCE_DIR |
module |
Set the module that you want to test. To see your available modules, please open your project in Android Studio, go to Project Structure and see the list on the left. Leave this input blank to test all modules. | ||
variant |
Set the variant that you want to test. To see your available variants, please open your project in Android Studio, go to Project Structure, then to the variants section. Leave this input blank to test all variants. | ||
arguments |
Extra arguments passed to the gradle task | ||
report_path_pattern |
The step will use this pattern to export Local unit test HTML results. The whole HTML results directory will be zipped and moved to the $BITRISE_DEPLOY_DIR . You need to override this input if you have custom output dir set for Local unit test HTML results. The pattern needs to be relative to the selected module's directory. Example 1: app module and debug variant is selected and the HTML report is generated at: - <path_to_your_project>/app/build/reports/tests/testDebugUnitTest this case use: *build/reports/tests/testDebugUnitTest pattern. Example 2: app module and NO variant is selected and the HTML reports are generated at: - <path_to_your_project>/app/build/reports/tests/testDebugUnitTest - <path_to_your_project>/app/build/reports/tests/testReleaseUnitTest to export every variant's reports use: *build/reports/tests pattern. |
required | *build/reports/tests |
result_path_pattern |
The step will use this pattern to export Local unit test XML results. The whole XML results directory will be zipped and moved to the $BITRISE_DEPLOY_DIR and the result files will be deployed to the Ship Addon. You need to override this input if you have custom output dir set for Local unit test XML results. The pattern needs to be relative to the selected module's directory. Example 1: app module and debug variant is selected and the XML report is generated at: - <path_to_your_project>/app/build/test-results/testDebugUnitTest this case use: *build/test-results/testDebugUnitTest pattern. Example 2: app module and NO variant is selected and the XML reports are generated at: - <path_to_your_project>/app/build/test-results/testDebugUnitTest - <path_to_your_project>/app/build/test-results/testReleaseUnitTest to export every variant's reports use: *build/test-results pattern. |
required | *build/test-results |
is_debug |
The step will print more verbose logs if enabled. | required | false |
Outputs
There are no outputs defined in this stepWe welcome pull requests and issues against this repository.
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.
Learn more about developing steps: