Wire Android uses a layered testing strategy covering unit tests, instrumented UI tests, and static analysis. This page describes how to run each type and how the test infrastructure is organised.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/wireapp/wire-android/llms.txt
Use this file to discover all available pages before exploring further.
Gradle tasks
The following Gradle tasks are available from the project root:| Task | Description |
|---|---|
./gradlew runUnitTests | Runs all unit tests |
./gradlew runAcceptanceTests | Runs all acceptance tests on a connected device |
./gradlew testCoverage | Generates a test code coverage report |
./gradlew staticCodeAnalysis | Runs static code analysis (Detekt) |
Unit tests
Unit tests run on the JVM and do not require a connected device or emulator.Parameterized tests with JUnit 5
The project uses JUnit 5 parameterized tests to avoid writing multiple test cases for the same scenario with different inputs. Tests annotated with@ParameterizedTest receive their parameters as method arguments.
Acceptance and UI tests
Acceptance tests are instrumented tests that run on a connected Android device or emulator.UIAutomator framework
Wire Android migrated from Appium to UIAutomator for integrated UI testing. UIAutomator is part of the Android SDK and is more flexible than Espresso for cross-app testing scenarios. UI tests live in a dedicatedtests/ module with the following structure:
testsSupport and reused across test modules, enabling parallel execution across devices if needed.
Test annotations and filtering
UI tests use custom annotations that enable fine-grained filtering and structured reporting:com.wire.android.tests.support.suite.TaggedFilter. Only tests matching the filter run; all others are excluded entirely and do not appear in reports.
Running specific test subsets
- By test case ID
- By category
- By tag
Allure reports
The UI test suite integrates with Allure for rich HTML reporting. Allure results are written to the device at:Static code analysis
The project uses Detekt for Kotlin static analysis.Code coverage
Coverage thresholds
The project targets the following coverage levels (configured incodecov.yml):
| Scope | Target | Behaviour |
|---|---|---|
| Project | Auto (based on base branch) | Fails if coverage drops more than 2% |
| Patch (PR diff) | 80% | Informational only — does not fail the build |
Paths excluded from coverage
The following paths are excluded from coverage measurement:buildSrc/kalium/(submodule)- Test source sets (
**/test/**,**/androidTest/**) - Generated screens (
**/*Screen*.kt) - Mock, theme, common, navigation, and DI directories