Detox vs Espresso
Detox
wix.github.ioEspresso
developer.android.comSide by side
| Figure | Detox | Espresso |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | — | Yes |
| Windows | Yes | — |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| iOS | Yes | Yes |
| Android | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Automated Testing | 8.5 (#10) | 8.8 (#4) |
| Spec score · Mobile App Testing Software | 8.4 (#13) | 8.7 (#6) |
| Support | The project directs users to Stack Overflow, GitHub issues, and Discord for questions and support. | The project directs general questions to its AndroidX Test Discuss mailing list and specific questions to Stack Overflow, while using GitHub issues for feature requests and bugs. |
| Synchronization | Detox monitors asynchronous operations in the app to reduce flaky tests. | Espresso automatically synchronizes test actions with the app UI by detecting when the main thread is idle. |
Plans
In their own words
Detox
Detox is an open-source framework for end-to-end testing of React Native mobile apps. It runs tests on real devices or simulators and simulates user interactions, with JavaScript tests for iOS and Android. Its gray-box method accesses app internals, while monitoring asynchronous app activity to reduce flaky tests. An async-await API supports breakpoints in asynchronous tests. Teams can use Detox APIs with any test runner or independently; Jest integration is included. The project describes it as suitable for CI and documents CI workflows. Detox is free under the MIT License, supports self-hosted runners and visual testing, and is listed for Android, iOS, Linux, macOS and Windows. React Native v0.77.x through v0.84.x is fully compatible with the New Architecture; later versions may work but are not thoroughly tested. Expo integration is community-driven and not maintained by the Detox team. Non-React Native Android apps are not supported. iOS simulator setup requires applesimutils, which the setup guide says is for macOS only.
Espresso
Espresso is a free, open-source framework for writing automated user-interface tests for Android apps. Before a test acts or checks a screen, it waits for the app’s message queue, AsyncTask work and developer-defined idling resources to become idle. Its packages cover core testing, WebView components, idling resources, intents and other testing support. Espresso-Web tests Android WebViews, while Espresso-Intents can validate and stub app intents. Multiprocess Espresso supports interactions across processes within an app, but it requires Android 8.0/API 26 or later and does not test external processes. Tests run in Android Studio or from the command line with Gradle; installation uses the SDK Manager and Gradle, and Android Studio is recommended. The framework supports Android 4.0.1/API 14 or higher. Test Recorder can capture device interactions and assertions to generate a UI test, while AccessibilityChecks can evaluate views during actions. The listed stable release and core dependency are version 3.7.0. Espresso is Apache-2.0 licensed.