Detox is a gray box end-to-end testing and automation framework for mobile apps.
The core problem Detox addresses is flakiness in mobile end-to-end tests. Traditional black box testing approaches struggle with non-deterministic behavior because they cannot observe the internal state of the application. Detox solves this by adopting gray box testing, which monitors asynchronous operations within your app to achieve automatic synchronization. This means tests wait for the app to reach a stable state before proceeding, eliminating the race conditions that cause flaky tests. Tests interact with the app exactly as a real user would, running on actual devices or simulators rather than through emulated interactions.
Detox is designed for React Native projects on both Android and iOS, with tests written in JavaScript. It works with any test runner through its core APIs and includes Jest integration out of the box. The tool is built for continuous integration workflows, allowing teams to reduce reliance on manual QA by running tests reliably on CI platforms. The modern async-await API enables proper breakpoint debugging in asynchronous tests, which is uncommon in mobile testing frameworks. Detox officially supports recent React Native versions and is compatible with React Native's New Architecture, though it may work with older versions as well.
The project maintains active engagement with its community through a Discord server and accepts issue reports for problems with unsupported React Native versions. Development activity shows consistent attention to compatibility with evolving React Native releases and responsiveness to user-reported issues. The tool continues to receive updates addressing edge cases, such as known visibility issues on Android inherited from React Native itself.