skip to content

[ compare · mobile testing frameworks ]

e2e vs detox

Detox tests React Native apps from inside an instrumented build. e2e tests your normal build from outside, with agent goals and exact checks.

[ at a glance ]

what each tool is.

  • made by, license

    [ e2e ]

    e2e, Apache-2.0

    [ detox ]

    Wix, MIT

  • apps

    [ e2e ]

    React Native, Expo, SwiftUI, Jetpack Compose, Kotlin Multiplatform, Flutter, .NET MAUI; web in the same suite

    [ detox ]

    React Native on iOS and Android; no non-React-native apps on Android

  • app build

    [ e2e ]

    your normal debug or release build, nothing added to the app

    [ detox ]

    a Detox build with the Detox framework inside, plus gradle and test-runner changes on Android

  • test runner

    [ e2e ]

    built in: fixtures, describe, tags, retries, workers, shards

    [ detox ]

    Jest out of the box, set up by detox init

  • waiting for the app

    [ e2e ]

    black box: actions wait for their target, assertions retry, agent.waitFor waits for a condition in plain language; settle and transition options

    [ detox ]

    gray box: waits for network requests, timers, animations, and the React Native threads

  • when ai is used

    [ e2e ]

    at run time, when a step needs it. verified goals replay without model calls.

    [ detox ]

    optional, at run time, through Detox Pilot with an llm you connect

  • devices

    [ e2e ]

    iOS simulators, Android emulators, connected iPhones and Android phones, hosted providers

    [ detox ]

    iOS simulators, Android emulators, attached Android devices, Genymotion cloud; devices not yet supported on iOS

  • expo

    [ e2e ]

    development and release builds, EAS Workflows, EAS Simulators as hosted devices

    [ detox ]

    community-driven integration

[ the same test ]

the same test,written both ways.

detox
describe('login', () => {
  beforeAll(async () => { await device.launchApp({ newInstance: true }); });

  it('shows the home screen', async () => {
    await element(by.id('email')).typeText('ada@example.test');
    await element(by.id('password')).typeText('hunter2');
    await element(by.text('Sign in')).tap();
    await waitFor(element(by.id('home'))).toBeVisible().withTimeout(10000);
    await expect(element(by.text('Welcome, Ada'))).toBeVisible();
  });
});
e2e
import { test } from '@e2e-dev/mobile';
import { expect, credentials } from 'e2e';

test('shows the home screen', async ({ agent, app, screen }) => {
  await app.open();
  const ada = credentials.user('ada');
  await agent.act('sign in as {username}', { params: { username: ada.username, password: ada.password } });
  await expect(screen.getByTestId('home')).toBeVisible({ timeout: 10_000 });
  await expect(screen.getByText('Welcome, Ada')).toBeVisible();
});

the agent handles sign-in with a credential the model never sees. both assertions stay exact.

[ differences ]

the five main differences.

  • gray box and black box

    Detox runs inside the app build and waits for network requests, timers, animations, and app threads to become idle. it needs native integration.

    e2e drives your normal build through accessibility. actions wait for targets and assertions retry, but e2e cannot observe the app's internal idle state. Detox offers deeper synchronization for React Native.

  • what runs in ci

    Detox uses detox build, a binary path in .detoxrc.js, and Jest.

    e2e uses the .app or .apk your project already builds. configure each platform as a target. ci guides cover GitHub Actions, EAS Workflows, Bitrise, and Codemagic.

  • when ai is used

    Detox Pilot turns natural-language instructions into Detox actions through a model and prompt handler you connect.

    e2e includes agent.act and model-judged checks. cached goals replay without model calls; stale recordings can hand control back to the agent. Secret parameters keep credentials out of prompts and reports.

  • platforms

    Detox focuses on React Native apps on iOS and Android.

    e2e covers web and native mobile with the same test api. examples include Expo, SwiftUI, Jetpack Compose, Kotlin Multiplatform, Flutter, and .NET MAUI.

  • device control and mocks

    Detox supports Metro module mocks, reloadReactNative, status-bar control, and url blocking from inside the app.

    e2e controls devices from outside: location, permissions, biometrics, clipboard, app installation, and deep links. it has no equivalent for module mocks or reloadReactNative.

01 / 05

[ side by side ]

feature by feature.

Detox offers deeper React Native synchronization and module mocks. e2e uses your normal build and covers more platforms.

  • apps

    [ e2e ]

    [ e2e ]

    React Native, Expo, SwiftUI, Jetpack Compose, Kotlin Multiplatform, Flutter, .NET MAUI; web in the same suite

    [ detox ]

    React Native on iOS and Android

  • app build

    [ e2e ]

    [ e2e ]

    normal debug or release build

    [ detox ]

    Detox build, Detox framework inside, Android native edits

  • waiting for the app

    [ detox ]

    [ e2e ]

    actions wait, assertions retry, settle and transition options

    [ detox ]

    gray-box idle detection: network, timers, animations, js thread

  • run artifacts

    [ detox ]

    [ e2e ]

    a video per attempt, screenshots, and a trace.md page per failed test

    [ detox ]

    screenshots, video, logs, timeline, and Instruments traces

  • finding elements

    [ even ]

    [ e2e ]

    getByTestId, getByText, getByLabel, getByRole, filter, nth; device.locator for native selectors

    [ detox ]

    by.id, by.text, by.label, by.type, withAncestor, atIndex

  • when the ui changes

    [ e2e ]

    [ e2e ]

    stale goals can return to the agent; exact assertions still check the result

    [ detox ]

    update the scripted steps

  • plain-language steps

    [ e2e ]

    [ e2e ]

    act, assert, waitFor, extract; replay cache; Secret redaction

    [ detox ]

    Pilot, with an llm you connect, in active development

  • module mocks

    [ detox ]

    [ e2e ]

    none; black box

    [ detox ]

    Metro file-extension mocks at bundle time

  • real devices

    [ e2e ]

    [ e2e ]

    connected iPhones with signing setup, Android phones, hosted providers

    [ detox ]

    attached Android devices; no physical iOS devices

  • Expo

    [ e2e ]

    [ e2e ]

    development and release builds, EAS Workflows, EAS Simulators as hosted devices

    [ detox ]

    community-driven

[ which one ]

which one to pick.

pick by the job in front of you: first the jobs where e2e is the better choice, then the jobs where detox is the better choice.

  • testing the build you ship

    [ e2e ]

    no framework inside the app, no gradle or test-runner changes.

  • one suite for iOS, Android, and web, or apps in Expo, Flutter, SwiftUI, Jetpack Compose, or .NET MAUI

    [ e2e ]

    e2e supports multiple mobile frameworks and browsers; Detox focuses on React Native.

  • long flows that change often

    [ e2e ]

    goals the agent completes sit beside exact checks, and verified goals replay without model calls.

  • a coding agent that writes and fixes tests

    [ e2e ]

    it works against the app while it runs on a simulator or device.

  • a React Native app on iOS and Android only, where synchronization matters more than platform reach

    [ detox ]

    Detox waits from inside the app for network, timers, animations, and the JavaScript thread.

  • module mocks at bundle time or reloadReactNative

    [ detox ]

    gray-box access e2e does not have.

  • performance recordings of a test run on iOS

    [ detox ]

    Detox's artifacts include timeline and Instruments traces; e2e records a video per attempt and a trace.md page per failed test.

  • setting the status bar or blocking urls from inside the app

    [ detox ]

    Detox's device control reaches inside the app; e2e's device fixture works from outside.

[ switching ]

run both, move one spec at a time.

  1. [step 1]

    run npx e2e init and choose the mobile engine.

  2. [step 2]

    follow the migration guide to configure your existing build and port one spec.

  3. [step 3]

    run npx e2e run <file> on each platform. keep the Detox spec until you trust the replacement.

the migration guide covers setup, api differences, and unsupported features. need help? book a call with the e2e team.

[ faq ]

questions.

what people on detox ask before they add e2e.

[001]do i need a special build for e2e?

no. e2e uses your normal debug or release build. it needs none of Detox's framework, gradle, or Android test-runner changes.

[002]do my testids still work?

yes. getByTestId reads accessibility identifiers on iOS and resource ids on Android. React Native testID props carry over.

[003]how does e2e wait without synchronization?

actions wait for targets and assertions retry. agent.waitFor checks a plain-language condition; settle and transition tune screen stability. Detox can also observe internal app activity.

[004]is e2e's agent like detox pilot?

both accept natural-language steps. Pilot uses a prompt handler you connect. e2e includes the runtime agent, replay cache, and Secret redaction.

[005]does e2e work with expo?

yes. use development or release builds, EAS Workflows, and hosted EAS Simulators.

[006]what's the difference between e2e and detox?

Detox synchronizes with React Native from inside an instrumented build. e2e drives your normal build from outside and also covers web and other mobile frameworks.

ask anything else

facts checked 30 october 2026 against Wix.GitHub.io/Detox (20.51.3) and the e2e docs. something out of date? open an issue on github.

[ get started ]

your verificationlayerstarts withjust one command

npx e2e init