# Mobile E2E tests, recorded by your agent

Your agent goes through your app once, checking each step along the way. Argent turns that journey into a simple YAML test that automatically runs on every pull request.

Install with: `npx @swmansion/argent init`

Docs: https://docs.swmansion.com/argent/docs/features/e2e/

## Keep the path your agent already found

Every time an agent checks a feature, it figures out the way through your app: which screen to open, what to tap, and what should show up next. Usually, all of that is gone when the session ends.

Argent E2E keeps it as a test, so next week's branch gets the same check without anyone writing it again.

Video: https://www.youtube.com/watch?v=OmbABXmOQKo

## Record it once, run it on every PR

Your agent records the test on a simulator, you review it as a short YAML file, and CI runs it on every pull request.

### Your agent writes the test as it goes

You describe the flow, and your agent performs it on a simulator or emulator one step at a time. A step is saved only after the agent sees the expected result on screen.

At the end, the whole test is replayed once to confirm it passes. Elements are found by their ID or label, not their position on screen, so layout changes won't break the test. If an element has neither, your agent can add an ID to your code for you. Tapping by screen coordinates is only the last resort, and Argent warns you when it happens.

### A short file you can read in a PR

Each test is saved as a YAML file in `.argent/e2e/`, so it's easy to review and to fix by editing a single line. It isn't tied to a specific device and runs on any simulator or emulator.

Besides taps, a test can wait for a screen, check text, compare screenshots, dismiss pop-ups like cookie banners when they appear, reuse shared steps such as logging in, and run a script to seed test data.

### Runs in CI without an agent

`argent e2e run` replays the saved steps directly, with no agent or AI model involved. If a step fails, your CI job fails too, and you get a screenshot of the device at that moment plus a command that re-runs only the failing test.

## Roughly twice as fast as Maestro

We moved the Maestro suite of a recipe app to Argent E2E. An agent did the whole migration overnight and opened one pull request by morning. On the same simulator, build and network, the 53 tests both suites share ran 1.95x faster.

- **0.40s**: median tap, down from 1.59s on Maestro
- **15.5 min**: for the 53 shared tests, down from 30.4 min
- **23 of 53**: tests ran at least twice as fast

## Works with the stack you already have

Argent E2E talks to the app on the device, so it doesn't matter which framework drew the screen.

### Frameworks

- Native iOS (UIKit, SwiftUI)
- Native Android (Views, Jetpack Compose)
- React Native
- Expo
- Flutter
- Kotlin Multiplatform

### Devices

- iOS simulators
- Physical iPhones
- Android emulators and devices
- Chromium and Electron apps
- Fire TV (Vega)
- Mac apps
- Argent Cloud simulators: https://argent.swmansion.com/cloud/

## From install to CI in three steps

### 1. Install Argent

One command sets everything up: Argent itself, its MCP server and the skills your agent needs to write E2E tests. It works with Claude Code, Cursor, Codex and other coding agents.

`npx @swmansion/argent@latest init`

### 2. Ask for a test

Tell your agent what to check in plain words, or paste a ticket and let it turn the acceptance criteria into a regression test. You need an agent to record a test, but not to run it.

`Record the path from the start screen to the checkout summary as an E2E test named checkout.`

### 3. Add it to CI

In our GitHub Actions example, building the app, booting a simulator and running the suite takes about five minutes on a hosted macOS runner, and most of that is the simulator starting up. Android runs on a Linux runner with KVM. If you'd rather skip macOS runners, `--platform ios-remote` runs your iOS tests on Argent Cloud.

`argent e2e run .argent/e2e --recursive --platform ios`

## FAQ

### Do I need an AI agent to run these tests?

Only to record them. Recording needs a coding agent like Claude Code, Cursor or Codex. Running a test is a single `argent e2e run` command, so it fits into any CI job or script.

### Can I write or edit tests myself?

Of course. They're plain YAML files, and the E2E YAML reference in the docs lists every step and option.

### How is this different from Maestro?

Both keep tests in YAML. The differences are speed and who looks after the tests. Argent taps right away and only waits for what the next step needs, and the same agent that recorded a test can debug the app when it breaks. If your Maestro suite works and your team is happy with it, keep it: Argent Cloud runs Maestro suites too.

### Can my agent move our Maestro tests over?

Yes. Our migration write-up includes the prompt we used. The agent ports your flows, runs each test until it passes twice in a row and opens one pull request listing what failed, any app bugs it found and every tap that still relies on coordinates.

### What should I know before I start?

A run uses one device, and the tests in a folder run one after another, so split big suites across CI jobs. Tests also keep the app's data between runs, so start each one with a launch step or a small script that resets what you need.

### What happened to Argent flows?

Since Argent 0.30.0 they're called E2E tests. Your old `.argent/flows/` folder and the `argent flow` command still work, and new recordings land in `.argent/e2e/`.

### How much does it cost?

Nothing. Argent E2E is part of `@swmansion/argent` on npm. If you'd like to run iOS tests without your own Macs, Argent Cloud is a paid add-on starting at $299 a month.

## Read more about Argent E2E

- [Argent E2E Tutorial: Record a Mobile Test and Run It in CI](https://argent.swmansion.com/blog/argent-e2e-tutorial.md): Add Argent E2E tests to an existing iOS or Android app: let your agent record a test, replay it with one command, and run it in GitHub Actions on every PR.

## Want help bringing agents into your mobile testing?

We build Argent and use it every day across our engineering teams, on client apps and on open-source libraries like React Native Screens. Tell us about your app and we'll help your team set it up.

Contact Software Mansion: https://swmansion.com/contact/