> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobster.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Run your checks on simulators and iPhones

> Run every check in your project on simulators and your iPhone, and read why one failed.

`mobster test` runs your saved checks on this Mac and writes a report with each verdict and its screen. The check's assertions decide the result, even when a model runs the steps.

To write your first check, follow [Test your app](https://docs.mobster.dev/quickstart/test.md). To convert Maestro flows, see [Moving from Maestro](https://docs.mobster.dev/maestro-import.md).

## Run every check

From your project folder, or any folder under it:

```sh theme={"theme":"css-variables"}
mobster test
```

Mobster finds every `.yaml`, `.yml` and `.json` check in `.mobster/checks` and runs each on its own simulator (its `device`, else iPhone 17 Pro). It prints a line per check, such as `✓ passed  <check> on iPhone 17 Pro, iOS 26.4`, `✗ failed` or `~ flaky`, then the totals and the paths of the HTML report and `junit.xml` under `.mobster/test-results/`. Progress goes to stderr as each run starts and ends. Pass check files or folders to run only those: `mobster test .mobster/checks/bookmarks.yaml`.

> [!NOTE]
>
> You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.

Under a check that didn't pass, Mobster prints the reason, then `Steps this run did:` (the last 25), `Expectations that failed:` with what each one saw, and `On the screen at the end:` with up to 40 elements of the last screen, each written as the selector that finds it. `mobster test guide` prints how to write a check and read this output on one page.

Launch-only checks make no model calls. Checks with `steps` run with a model on your Claude or OpenAI key, as `mobster verify` does, within each check's `budget`, until they pass once. Then they [replay](https://docs.mobster.dev/testing/replay.md) with no model, on every new build of your app too. A changed tap that Mobster heals by itself needs no key. A replay that drifts past that pays for one heal attempt on your key. `--keyless` never calls a model: a check with steps replays its recorded steps, and one with nothing recorded yet couldn't run.

A check can also assert your app's saved values through an app-state fixture on a simulator ([Fixtures](https://docs.mobster.dev/fixtures.md)). A missing or invalid fixture makes that check unable to run while the other checks continue.

## Run checks from Mobster for Mac

> [!NOTE]
>
> You get this in the next release, not in Mobster for Mac 0.4.0 or Mobster CLI 0.4.4.

On a project's page, **Run checks** runs the project's checks, and **New check** in Checks opens `/projects/<id>/checks/new`. To make a check from a task, **Make this a check** in the task composer and **Make a check…** on a finished task open a new check with the task's steps. Read the app's bundle ID, the steps and the words the last screen should show before you save. Saving doesn't run or verify the check. **Record a path** records a fresh run with a model, and **Run strict** confirms the saved replay with no healing.

To let a CI run use the project, choose **Approve…** under **Team CI** on its page. Pick the checks, a built simulator `.app` from `.mobster/build` and one managed simulator, then choose **Approve**. The row then says **Revision N approved**. The approval records those exact files, network stub bodies and snapshot baselines included. A CI suite checks them before each check and after its last one, and if one changed, the suite fails and exports no results. Approving doesn't start a run or issue a Remote key.

## Read the exit code

The exit code comes from the checks that aren't quarantined, and from your XCTest targets with `--xctest`. The first row that holds decides it:

| Exit code | When |
| - | - |
| 1 | A check failed, or was flaky with `--strict` |
| 3 | A check couldn't run, or the command had a usage error |
| 2 | A check needs review |
| 0 | Every check passed |
| 130 | You pressed `ctrl+c`. The runs in flight stop and the reports are written |

The [CLI reference](https://docs.mobster.dev/reference/cli/test.md) lists every flag.

## See proof for every step

A red check says which side to look at, and every step carries its own evidence. Mobster builds this from what the run already recorded (the step times, `logs/app.log`, the verdict frame). It calls no model and captures nothing more from your app.

```text theme={"theme":"css-variables"}
App problem: app crashed
```

* **The cause line** is one of: `app crashed`, `assertion failed on the final screen`, `timed out waiting for the screen to settle`, `step could not be done (control not found)`, `simulator or build problem` and a few more for the check and the environment. Its `side` is `app`, `check` or `environment`, so you can tell an app bug from a test bug from a Mac problem without a rerun.
* **The judged frame** is the one the verdict read, with the `treeHash` of the accessibility tree read on it. The report captions the frame with both and outlines each asserted element on it.
* **The log slice** is the app's log lines between the step before and the step itself, at most 8 a step and 160 a run, your own app's lines and errors first. `logs/app.log` has all of them.
* **The requests** are the HTTP requests the app's log shows in that span: method, host, status, duration and response bytes, never a path, query, header or body.
* **The clip** is the step's span in the `--video` recording, as a link that plays only that part (`videos/001-buy-1.mp4#t=0.6,2.6`).

The run's `report.html` puts a **Proof for this step** fold under each step, the failing step open. `index.html`, the pull request comment, `junit.xml` and `run_tests` over MCP carry the cause line, such as `Cause (app): app crashed.`, for each check that didn't pass.

`result.json` has `step_proof`, and `results.json` has the same as `stepProof` on each result:

| Field | Meaning |
| - | - |
| `cause` | `side`, `kind` (the reason class) and `line`. `null` for a pass |
| `judged` | `frame`, `overlay` (the frame with the outlines), `treeHash` and `verdictAtMs` |
| `steps[]` | `index`, `text`, `frame`, the span `fromMs` to `toMs` on the run clock, `log` (`count`, `lines`) and `network` (`count`, `rows`) |
| `after` | The same span from the last step to the verdict, with no `index` |

## Find why a task stopped

With `MOBSTER_EXPERIMENTAL_TRACES=1` set, a task that didn't finish carries one sentence that names why and the step it happened at. `mobster history` prints it under the task, `mobster history --json` has it as `failure`, and a failed check's repro in the pull request comment ends with it:

```text theme={"theme":"css-variables"}
**Failure:** Said it was done at step 6, but text “Welcome” failed.
```

| Class | The sentence says |
| - | - |
| `out_of_steps` | Every step, every second or the whole cost limit was used, and the last action it took |
| `gave_up` | The agent ended with its own "can't", or stopped seeing progress, and what it said |
| `premature_done` | The agent called the task done and the screen never showed every part finished |
| `blocked_by_prompt` | A lock screen, a passcode, Face ID, an iOS dialog Mobster leaves to you, or an approval nobody answered |
| `app_crashed` | The app stopped answering, so reads or taps timed out and the task couldn't go on |
| `wrong_app` | The agent opened an app Mobster never opens, or the app under test wasn't in front at the end |
| `stuck` | The same step was refused or failed three times |
| `error` | Anything else that ended the run: a model or connection error, an iPhone that was unplugged |

Mobster reads the sentence off the run's trace, so it costs no model call. A task that finished, that you stopped or that you declined has no sentence.

## Turn a task or a crash into a check

`mobster test record --run <task id> -o .mobster/checks/<name>.yaml` writes a finished task as a check, with its steps in plain words and what it proved as expectations. `mobster test repro crash.ips` turns a crash report into a check and runs it on a simulator with the screen recorded ([Crash to repro](https://docs.mobster.dev/dev/crashes.md)).

## Run checks from your coding agent

`mobster mcp` gives your coding agent the same runs as tools: `run_tests` runs the checks, or with `pr` the checks a branch needs, and `test_history`, `review_heals`, `save_check` and `repro_crash` cover the rest. [Tests tools](https://docs.mobster.dev/reference/mcp/tests.md) lists each one and its arguments.

## More

[Replay and heals](https://docs.mobster.dev/testing/replay.md): replay a passing check with no model, and review a heal.

[Simulators and iPhones](https://docs.mobster.dev/testing/devices.md): several simulators, your iPhone, every plugged-in iPhone, TestFlight builds.

[Network and device conditions](https://docs.mobster.dev/testing/conditions.md): location, permissions, push, a slow network, stubs, and what the app sent.

[System dialogs and languages](https://docs.mobster.dev/testing/dialogs.md): answer iOS's alerts and sheets, and run every check in each language.

[Flaky checks and shards](https://docs.mobster.dev/testing/flaky.md): retries, repeats, quarantine, the flake score, shards, and reruns of what failed.

[Reports, logs and video](https://docs.mobster.dev/testing/reports.md): the HTML, JUnit and JSON reports, and each check's log, crash and video.

[Share results](https://docs.mobster.dev/testing/share.md): hosted reports, Slack, webhooks and issues.

[Screenshots that must not change](https://docs.mobster.dev/testing/screenshots.md): compare screens to baselines.

[Accessibility audit](https://docs.mobster.dev/accessibility.md): audit every screen a check reads.

[Launch time, memory and hangs](https://docs.mobster.dev/testing/performance.md): the numbers every check takes, and budgets.

[Overnight and scheduled test runs](https://docs.mobster.dev/testing/schedules.md): nightly runs and schedules.

[XCTest targets](https://docs.mobster.dev/testing/xctest.md): your unit and UI tests in the same report.

[Test a pull request on your Mac](https://docs.mobster.dev/ci/test-pr.md): the checks a branch needs, and every pull request in your clone.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.