Detox logo

Detox

Open Source

Grey-box end-to-end testing framework for React Native apps.

Visit websiteGitHub

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

Medium

Maintenance

Medium

Learning

Intermediate

Licence

Free / Open source

// 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

ToolChoose it when
AppiumYou need cross-platform coverage beyond React Native.
MaestroYou want simpler, black-box flows with less build setup.
EspressoYou want native Android testing rather than RN gray-box.

// 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

  1. Add Detox to the React Native project

  2. Configure iOS/Android build settings for Detox

  3. Build the Detox test binary

  4. Write E2E tests in JS/TS

  5. Run on emulators/simulators via the Detox CLI

  6. Run in CI, leaning on gray-box synchronisation for stability