Running a unit test ⚓
Unit tests are useful if you want to verify individual code blocks, catch bugs or prevent crashes as early as possible.
This tutorial tells you how to run a unit test against your app and how to generate test reports using your primary workflow.
Luckily, your Android primary workflow already contains the Android Unit Test Step which is responsible for performing unit test on your build.
Generating and checking test results ⚓
You can check your Android unit test results on the Test Reports page. The Android Unit Test Step generates and exports unit test reports into the
$BITRISE_TEST_DEPLOY_DIR folder. Then the Deploy to Bitrise.io Step exports those reports from the
$BITRISE_TEST_DEPLOY_DIR folder to the respective build’s Test Reports page where you can view the test results.
To view the test results on the Test Reports page:
- Click the Builds tab of the app and select the build that ran the tests.
- Under the build status, click See more next to the Test reports label.
Check out our Test Reports guide to find out more about using it to analyze your test results.
Go through the procedure of adding an Android app on Bitrise from start to finish, from adding the app to deploying it. Learn about unit and UI testing and code...