Detox
Grey-box end-to-end testing framework for React Native apps.
Pricing
Free / Open source
Type
Automation
Languages
JavaScript, TypeScript
// VERDICT
Reach for Detox when you're testing a React Native app and want fast, deterministic E2E that waits on the app's actual state. Skip it when the app isn't React Native, or you need the cross-platform breadth of Appium.
Best for
Gray-box end-to-end testing built for React Native - it hooks into the app to synchronise with native operations, making RN tests faster and far less flaky than black-box automation.
Avoid when
Your app isn't React Native, or you want one cross-platform tool that also covers native and hybrid apps you don't control.
CI/CD fit
Detox CLI · GitHub Actions · GitLab CI · Jenkins
Languages
JavaScript · TypeScript
Team fit
React Native teams · JS/TS developers testing their own app · Teams fighting RN test flakiness
Setup
Maintenance
Learning
Licence
// BEST FOR
- End-to-end testing of React Native apps
- Gray-box synchronisation that waits on native operations automatically
- Faster, less flaky RN tests than black-box automation
- JS/TS authoring alongside the app's own codebase
- Developer-owned E2E for an RN team
- Deterministic runs that idle-wait instead of sleeping
// AVOID WHEN
- Your app is native or hybrid, not React Native
- You want one cross-platform tool across many app types (Appium)
- You don't control the app code to add the gray-box hooks
- Your team isn't working in the JS/RN ecosystem
- You need the broadest device-cloud ecosystem (Appium)
- The target is a mobile website, not an app
// QUICK START
npm install detox --save-dev
npx detox build --configuration ios.sim.debug
npx detox test --configuration ios.sim.debug// ALTERNATIVES TO CONSIDER
// FEATURES
- Synchronisation with app internals (no flaky sleeps)
- iOS and Android support
- Jest integration
- Element queries optimised for React Native
- Headless CI support
// PROS
- Stable and fast for React Native apps
- Built-in synchronisation eliminates flake
- Maintained by Wix engineering team
- Good CI integration
// CONS
- React Native focused — not generic mobile
- Setup can be challenging
- Smaller community than Appium
// EXAMPLE QA WORKFLOW
Add Detox to the React Native project
Configure iOS/Android build settings for Detox
Build the Detox test binary
Write E2E tests in JS/TS
Run on emulators/simulators via the Detox CLI
Run in CI, leaning on gray-box synchronisation for stability
// RELATED QA.CODES RESOURCES
Cheat sheets
Practice
Interview