On this page
Overview
AndroidX Test is a collection of Android testing libraries including AndroidJUnitRunner, Test Core, JUnit extensions, rules, Espresso, and Orchestrator. Together they support instrumented and UI tests that run on physical devices or emulators with access to Android framework APIs.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Run JUnit tests on Android devices with AndroidJUnitRunner
Instrumented tests run in a test APK on devices or emulators and can access Android context and framework APIs while using JUnit 4.
Sources: [4]
Automate View UI interactions with Espresso
Espresso adds View matching, interaction, and assertions for UI tests and is typically used in the same androidTest source set as the runner and rules libraries.
Combine Core, JUnit extensions, rules, and Orchestrator as needed
Separate artifacts provide ActivityScenario and other Core APIs, AndroidJUnit4 integration, test rules, and isolated test-process execution through Orchestrator.
Sources: [2]
Best fit
Fits integration and UI tests that require real Android framework behavior
Use instrumented tests when a local JVM test cannot reproduce Activity, Instrumentation, device UI, or other platform behavior accurately.
Sources: [4]
Before adoption
Stable versions differ by artifact; use the official release table
As of 2026-10-03, the official table lists Core 1.7.0, Runner/Rules 1.7.0, ext.junit 1.3.0, Espresso 3.7.0, and Orchestrator 1.6.1 as stable. GitHub Releases are not the canonical version source.
Instrumented tests are higher-fidelity but slower than local tests
The official guide recommends instrumented tests only where real-device framework behavior is needed because they run on physical devices or emulators and cost more time than local tests.
Sources: [4]
Keep test-only libraries in androidTestImplementation
Most AndroidX Test dependencies belong on the test APK classpath through androidTestImplementation. Exceptions such as idling-resource may need implementation when production code references their APIs.
Sources: [3]
Official sources
- [1]android/android-test README(2026-10-03)
- [2]AndroidX Test release notes(2026-10-03)
- [3]AndroidX Test project setup(2026-10-03)
- [4]Build instrumented tests(2026-10-03)
- [5]AndroidX Test Apache-2.0 license(2026-10-03)
Supplemental curator note
These are the core libraries for tests that must run on a real Android device or emulator. GitHub Releases are not the canonical current-version source; use the AndroidX release notes and Google Maven when selecting dependency versions.
Try it in 3 steps
- 1
Add stable AndroidX Test dependencies
Add the stable Google Maven artifacts to the app module's build.gradle or build.gradle.kts.
Add runner 1.7.0, ext:junit 1.3.0, and espresso-core 3.7.0 with androidTestImplementation - 2
Configure AndroidJUnitRunner
Set the instrumentation runner in android.defaultConfig and place tests under src/androidTest.
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - 3
Run instrumented tests on a device or emulator
Run against connected Android targets and inspect the generated androidTests/connected report.
./gradlew connectedAndroidTest
Growth
Growth trends · Last 30 days
1,225 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 9
- Open PRs
- 128
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
- Stars
- 1,225
- Forks
- 344
- Watchers
- 125
- Open issues
- 211
- Contributors
- 42
- Owner type
- Organization
- Primary language
- Java
- License
- Apache-2.0
- Repository last updated
- Sep 28, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Android Frameworks Base10,820 Stars
2 shared tag(s) · 1 shared category(s) · Same language
inspect and modify core Android framework APIs and system services within a full AOSP build
Java - OpenPDF4,373 Stars
2 shared tag(s) · 1 shared category(s) · Same language
embed PDF creation, conversion, and protection in JVM applications
Java - Flutter179,266 Stars
2 shared tag(s) · 1 shared category(s)
build mobile, web, and desktop UI from one Dart codebase
Dart - React Native126,786 Stars
2 shared tag(s) · 1 shared category(s)
native mobile UI with React, stable 0.87.1, and a framework-first path
C++ - Expo52,540 Stars
2 shared tag(s) · 1 shared category(s)
build React Native apps for Android, iOS, and web from one project model
TypeScript - Android Jetpack (AndroidX)6,103 Stars
4 shared tag(s) · 1 shared category(s)
use independently released Jetpack libraries for Android UI, architecture, data, and background work across platform versions
Kotlin
Report incorrect information
Tell us if any listing information is incorrect or outdated.