Espresso
Google's native Android UI testing framework. Fast, reliable, and tightly integrated with Android Studio for Android-only teams.
Overview
Espresso is Google's official UI testing framework for Android applications. Built into Android Studio and the Android Testing Support Library, Espresso provides a concise API for writing reliable UI tests that run directly on Android devices or emulators. Unlike cross-platform tools like Appium, Espresso tests run in the same process as the app, eliminating the flakiness caused by timing issues between the test runner and the app.
For Android-native teams, Espresso is the gold standard. It is fast, reliable, and deeply integrated with the Android toolchain. However, it only tests Android — iOS teams need a separate tool.
What it's used for
Espresso is essential when:
- Android-only app: No need for cross-platform — use the native framework.
- Speed and reliability matter: In-process execution eliminates most timing-related test flakiness.
- Deep Android integration needed: Test intents, services, content providers, and custom views.
- Android Studio workflow: Tests are written in Kotlin or Java and run from the IDE like unit tests.
Pros & Cons
Pros
- Fast execution — tests run in the same process as the app
- Highly reliable compared to cross-platform tools
- Deep Android integration (intents, services, content providers)
- Built into Android Studio — zero additional setup
- Strong community and Google backing
Cons
- Android only — no iOS support
- Requires Kotlin/Java knowledge
- Cannot test across multiple apps (system-level interactions)
- Setup for CI can be complex (emulator management, device farms)
- Less flexible than Appium for hybrid or webview apps
Platforms & Integrations
Espresso runs on Android devices and emulators. It requires Android Studio and is written in Kotlin or Java.
Pricing
| Tier | Cost | Includes |
|---|---|---|
| Open Source | Free | Full framework, all features, community support |
NZ Context
Espresso is standard in NZ Android development teams. Apps like Trade Me and ANZ NZ use Espresso for their Android UI test suites. NZ Android developer job postings routinely list Espresso as a required or preferred skill. For NZ teams building Android-only products, Espresso is the default choice over Appium.
Alternatives
- Appium — Cross-platform: one test suite for Android and iOS.
- UI Automator — Google's framework for system-level and cross-app testing.
- Maestro — Modern, YAML-based cross-platform mobile testing with simpler setup.