This document explains how to run Android UI tests locally, how to filter which tests execute, and how to generate Allure HTML reports.
Important:
- This guide is for local execution only.
- CI pipelines may follow different steps or use additional automation.
Tests use custom annotations that enable filtering and reporting:
TestCaseId:
@TestCaseId("TC-8602")
Category:
@Category("criticalFlow")
Filtering is handled by one JUnit filter:
com.wire.android.tests.support.suite.TaggedFilter
It reads these arguments:
- testCaseId
- category
- tagKey
- tagValue
Only tests matching the filter run.
All other tests are fully excluded and do NOT appear in Allure reports.
Example: run only tests annotated with @TestCaseId("TC-8602")
./gradlew :tests:testsCore:connectedDebugAndroidTest
-Pandroid.testInstrumentationRunnerArguments.testCaseId=TC-8602
Example annotation:
@Category("criticalFlow")
./gradlew :tests:testsCore:connectedDebugAndroidTest
-Pandroid.testInstrumentationRunnerArguments.category=criticalFlow
Example annotation:
@Tag(key = "feature", value = "calling")
./gradlew :tests:testsCore:connectedDebugAndroidTest
-Pandroid.testInstrumentationRunnerArguments.tagKey=feature
-Pandroid.testInstrumentationRunnerArguments.tagValue=calling
Note: Only runs tests where both key AND value match.
Important:
- CI passes
android.testInstrumentationRunnerArguments.appPackageexplicitly. - Local runs keep using the package selected in each test setup.
- Change the local
UiAutomatorSetup.APP_*selection in the test when you want a different local flavor. - Example values:
com.wire.internalfor alpha release candidatecom.wire.android.internalfor alpha betacom.wirefor production
Install allure
/sdcard/googletest/test_outputfiles/allure-results
adb exec-out sh -c 'cd /sdcard/googletest/test_outputfiles && tar cf - allure-results' > allure-results.tar
rm -rf allure-results
mkdir allure-results
tar xf allure-results.tar -C allure-results
allure serve allure-results/allure-results
- Passed tests
- Failed tests with screenshot
- Tags (TestCaseId, Category, feature:value)
- Only executed tests (no noise)