Detox migration

SootSim provides a drop-in Detox driver that runs your existing Detox tests against the canvas simulator instead of a native iOS simulator.

What works unchanged

  • by.id(), by.text(), by.label() matchers
  • element().tap(), .longPress(), .typeText()
  • expect().toExist(), .toBeVisible(), .toHaveText()
  • waitFor().toExist().withTimeout()
  • device.launchApp(), device.reloadReactNative()

How to migrate

1. Install SootSim

terminal

bun add sootsim

2. Run your tests

terminal

sootsim test --detox

SootSim auto-detects your Detox config (.detoxrc.js, detox.config.js, or package.json#detox) and runs your test files with its driver.

3. Fix native-specific tests

Some Detox features depend on native capabilities that SootSim simulates differently:

detox featureSootSim behavior
device.takeScreenshot()captures canvas screenshot
device.shake()no-op
device.setBiometricEnrollment()no-op
device.setLocation()no-op (use config instead)
device.setURLBlacklist()no-op

4. Add to CI

terminal

# replace native detox in CI
sootsim test --detox --reporter junit

Benefits over native Detox in CI:

  • No iOS simulator — runs on Linux CI runners
  • No Xcode — no build step needed
  • Faster — no native compilation
  • Cheaper — use standard Ubuntu runners instead of macOS

Keeping both

You can keep native Detox tests alongside SootSim:

{
"scripts": {
"test:native": "detox test",
"test:sootsim": "sootsim test --detox"
}
}

Run SootSim in CI for fast feedback, native Detox for final validation.