Your First Test
Peach supports two test runners. Maestro owns YAML tests; Detox runs imperative Jest specs through the Peach driver.
Tests need a free Peach account. Run peach login, or give peach setup a key from peach auth key create or Billing → API Keys: it saves one it finds in PEACH_API_KEY or ~/Downloads/peach-api-key.txt, or asks you to paste it.
Maestro YAML
Connect your app using the Quick Start, then run
peach describe to see its current text and test IDs. This example assumes
a Welcome screen with a Get Started button that opens Home.
Replace those selectors with the corresponding controls in your app and
save .maestro/smoke.yaml.
Copy text from peach describe exactly. A label can contain a non-breaking
space (U+00A0) that prints like a normal space, and a selector typed with a
normal space does not match it. Prefer a real testID through id:. Without
one, keep the original character in the string or match the gap with a regex
such as Get[\s\u00a0]Started.
Run it:
Detox-style tests
The same illustrative screen names apply to the Detox example. Replace them
with your app’s selectors and create e2e/my-app.test.ts:
Jest runs from your project, so add its dev dependencies once, then run:
--app names the app each device.launchApp() opens: your dev server’s port
or a bundle URL.
The driver includes its browser dependency and downloads Chromium on its first
launch when needed. Use waitFor for content revealed after an app splash or an
asynchronous load.
Existing Detox suites use the same command unchanged. Peach auto-detects the
configuration and remaps import { by, device, element, expect } from 'detox' to its
driver.
Test bridge API
All test drivers access the node tree through window.__sootsimTest: