Android Unit Tests
The Android Unit Tests workflow step executes the unit tests within your project, ensuring comprehensive test coverage. The results of these tests will be included in the artifact archive for further analysis and review.
Please check out this document for more information: Running Android Unit Tests
Prerequisites
Before running the Android Unit Tests step, you must complete certain prerequisites, as detailed in the table below:
Prerequisite Workflow Step | Description |
---|---|
Git Clone | To initiate the Android Unit Tests process, the repository that needs to be built must be fetched from the branch. This is achieved as follows: Upon completion of the Git Clone step, it generates the $AC_REPOSITORY_DIR variable, which is then used as the input for the Android Unit Tests step. |
If you wish to view the test results on Appcircle's Test Reports page, it is essential to use the Test Reports for Android step after the Android Unit Tests. Please check out this document for more information: Generating Test Report.
Input Variables
This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).
Variable Name | Description | Status |
---|---|---|
$AC_REPOSITORY_DIR | This variable represents the path of the cloned Git repository. If this step runs after the Git Clone step, the variable will be automatically populated. | Required |
$AC_MODULE | This variable specifies the project module to be built. This variable can also be set via the build Configuration. In Android Studio, you can locate the available modules for your project. For more information, please refer to this Android document. | Required |
$AC_VARIANTS | This variable specifies the project variant to be built. This variable can also be set via the build Configuration. In Android Studio, you can find the available variants for your project. For more information, please refer to this Android document. | Required |
$AC_PROJECT_PATH | Specifies the project path. If your project that needs to be built is not located in the root directory where it was cloned from Git, you should provide the subpath as a relative path. The default value is: ./ . | Optional |
Output Variables
The output(s) resulting from the operation of this component are as follows:
Variable Name | Description |
---|---|
AC_TEST_RESULT_PATH | Specifies the directory where your JUnit XML report is stored. |
To access the source code of this component, please use the following link: