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

> ## Agent Instructions
> ## XenoCI Box CI
> To move a repository's macOS CI jobs onto box, follow https://docs.xenoci.com/ci/agent.md. The user only presses Install on GitHub or makes one GitLab runner token; the agent does the rest.
> - Check: `box ci status` (exit 4: sign in first, https://docs.xenoci.com/setup.md).
> - GitHub organization: `box ci connect --org --no-browser --no-wait`, give the user the printed link (https://github.com/apps/xenoci-with-organizations/installations/new), then repeat `box ci accounts` until the owner appears. Personal account: `--personal` (https://github.com/apps/xenoci-with-personal/installations/new).
> - GitHub workflow: change only `runs-on: macos-*` to `runs-on: xenoci` on a branch and open a pull request.
> - GitLab: the user makes a project runner with tag `xenoci` and gives you the `glrt-` token; pipe it to `box ci gitlab connect -` (self-managed: `--url <gitlab url>`), then add `tags: [xenoci]` to the macOS jobs.
> - Watch: `box ci jobs`, `box ci logs <job id> --follow`. Failed job: `box ci jobs --failed`, then `box ci debug <job id>` (failing step, hint, last 200 log lines).

# Run your tests on several iPhones and iPads in one job

> box test --devices builds your tests once and runs them on each named simulator in turn, then prints one table.

## Run it

```text theme={"system"}
box test --devices "iPhone SE (3rd generation),iPhone 17 Pro Max,iPad (A16)"
```

box builds the tests once, then runs them on each device in turn, each with its own result bundle. At the end it prints one table:

```text theme={"system"}
box: tests on 3 devices
DEVICE                      RUNTIME   RESULT         PASSED  FAILED  SKIPPED   TIME
iPhone SE (3rd generation)  iOS 27.2  failed              2       1        0    41s
iPhone 17 Pro Max           iOS 27.2  passed              3       0        0    38s
iPad (A16)                  iOS 27.2  passed              3       0        0    44s
  FAIL [iPhone SE (3rd generation)] AppTests/testLayout(): clipped
```

* Name 1 to 6 devices, separated by commas. `box devices` lists the simulators the Mac has. A device type the Mac knows but has no simulator for (such as iPhone SE (3rd generation)) is made on the newest iOS runtime for this job and deleted afterwards.
* A device the Mac cannot provide gets a `not_available` row. The other devices still run.
* The job's result is the worst row: a failed test fails the job (exit 1), then a device that was not available (exit 2). A device that could not start is a box machine problem (exit 75, not billed).
* `--devices` goes with `--only-testing`, `--locale`, `--dark`, `--text-size`, `--location` and `--network`, which apply on every device. It does not go with `--device` or `--screenshot`.
* With `--json`, the table is one `{"t": "matrix", "devices": [...]}` line. Each row has `device`, `runtime`, `result`, `passed`, `failed`, `skipped`, `seconds` and `failures`.
* Each device's result bundle is saved as `test-<n>.xcresult.zip`, and the rows as `matrix.json`.

In MCP, the `test` tool takes `devices` as a list of names.

## What it costs

The job's normal minutes: one build, then the test time on each device.


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