Remote runs
These steps run your tests on another Mac (a runner machine). Your Mac sends the run over SSH, the runner executes it just like a local run, and the output and artifacts (reports, recordings, logs) come back to your Mac.
What remote runs can do, the overview, machine names, and how a run profile decides where a run goes are in Fleet concepts.
Before you start
The runner must already be prepared. If it is not, finish Adding a Mac first (preparing the runner, SSH, registering the machine, installing fleetest on the runner and checking the connection).
In Claude Code, you can also set up with the /fleetest-remote-setup skill. The skill
asks what it needs to know, leaves the mechanical work to fleetest remote setup, hands you the
parts that need a person, and reports the result at the end. It does not do the tasks that need
sudo or the GUI, such as preparing the runner, for you.
1. Add the runner's devices to a run profile
Which machine runs a test is decided by the machine written on each device in the run profile's devices
("The run profile decides where tests run" in Fleet concepts).
Prompt for the AI
Find the devices on M1Max and add them to the run profile ios-run.
If you do it manually (click to show details)
In the VSCode extension, open "Select Devices" from the run profile's "Add device" button and switch "Machine:".
On the CLI, look up the runner's devices with fleetest remote exec M1Max -- api installed-devices and write them, with
machine, into the run profile's devices. Both are described in Step 4 of Adding a Mac.
2. Run it
If the run profile's devices are on the runner, the run goes to the runner with the same prompt as any other run.
You do not need --runner.
Prompt for the AI
Run the scenario <scenario name> with the run profile ios-run.
If you do it manually (click to show details)
fleetest run --profile <run profile> --scenario <scenarioID> # follows the machine of the profile's devices
fleetest run --runner <name> --profile <run profile> # send this one run to a specific machine
fleetest run --project <project> --fleet <name> # run the same scenarios on every machine in the fleet
fleetest run --project <project> --fleet <name> --split # split the scenarios across the machines
A fleet is a list of machine and run profile pairs. Define it in
TestProjects/<project>/profiles/fleets/<name>.json as host (machine name) and profile
(run profile name) pairs under runs. Write "local" for your own Mac.
Running a fleet definition is available from the CLI only (not from the extension or MCP), and it is experimental.
// profiles/fleets/two-runners.json
{ "runs": [
{ "host": "M1Max", "profile": "ios-run" },
{ "host": "M2Ultra", "profile": "ios-run" } ] }
In a fleet definition you write the machine name under the host key (the key differs from the
machine key of a device in a run profile).
- With
--split, instead of running the same scenarios on every machine, the scenarios are divided among the machines. The split is estimated from how long past runs took. - With
--junit <path>, the results from every machine are merged into one file. Each<testsuite>'shostnametells you which machine it came from.
To send just this one run to a different machine, name the machine:
Run the scenario <scenario name> on M1Max with the run profile ios-run.
The first run takes a few minutes to start, because the runner builds the scenarios and so on. Later runs start within seconds.
3. Using it from the VSCode extension
The extension has no "choose where to run" screen. When you choose a run profile, the machine
its devices name decides where the run goes.
The extension can do the following (for the steps, see Adding a Mac):
- Register machines: in the "Machines" table of the Device Monitor's Settings tab. It reads
and writes the same registry as the CLI's
fleetest remote machines. - Add devices to a run profile: the run profile section's "Add device" button opens "Select
Devices"; switching "Machine:" there lists the devices on that machine. You can also create a
new device right there. Each added device gets the chosen machine name written as its
machine("local"for your own Mac). - Align versions before a run: before a run starts, it checks whether the runner's fleetest is on the same version as your Mac. If not, "Update and run" brings it in line.
Installing fleetest on a runner (fleetest remote setup) cannot be done from the extension. Use
the terminal.
Registered remote devices can be viewed and operated in the Device Monitor just like local ones, including state, live video and per-tile start/stop. The only visible difference is a badge with the machine name. Automatic repair of bridges also covers remote devices, but the device health watch (Wi-Fi repair) only applies to local devices. Physical devices are excluded from both.
Services in scripts/compose.yaml start on the runner, so the runner also needs a container
runtime and the images (see the requirements table in Adding a Mac).
4. Sharing one runner between several people
When you send a run to a runner that someone else is using, it waits until the runner is free. The execution log shows your position in line.
Prompt for the AI
Run the scenario <scenario name> on M1Max with the run profile ios-run. If M1Max is in use, wait up to 10 minutes for your turn.
If you do it manually (click to show details)
fleetest run --runner M1Max --profile <run profile> --scenario <scenarioID> --wait-lock 600
--wait-lock <seconds> is the longest it waits for the runner to become free. While you wait, the execution log shows your
position. For a run that spans several machines, the limit covers the whole wait (this Mac's lock, this Mac's devices
and each runner together), and the execution log also says when it is waiting for a device on this Mac to free up.
Only one run at a time can use a runner. The devices belong to that runner, so two runs are kept from fighting over the same device. When the runner is busy, you are shown who has been using it and since when. Your own Mac works the same way for the runs you start on it (see Parallel execution).
- Wait until it is free: a run from the extension waits for up to 1 hour by default — long enough to sit through
several runs ahead of you. Change it in the Device Monitor's Settings tab, under Machines →
Max wait on runner contention (0 fails right away without waiting); the setting key is
fleetest.remoteWaitLock. The CLI does not wait by default and fails instead, so add--wait-lock <seconds>. While you are in line, the execution log shows your position. The extension has no way to take over a busy runner. - See who is using it: it appears in the LOCK column of
fleetest remote status --runner <machine>.-means "could not be checked", not "free". The Device Monitor shows 🔒 on that machine's row in the toolbar. - Live video stops automatically during someone else's run: when another person's run starts, that machine's tiles switch from live video to still images, and switch back when the run ends. Streaming interferes with test execution. The same applies to a machine whose state cannot be observed. For your own run, streaming continues while the Device Monitor's "Live update" (on by default) is on. Also, if two people watch the same device at once, the one who opened it later gets still images.
- Operations that would break someone else's run stop first:
fleetest remote cleanstops if a run is in progress (--ignore-lockoverrides this, but kills that run). When you bulk-stop or delete devices in the extension, the confirmation shows whose run is in progress. - Release a dead lock: if a dispatch died and left its lock behind, reclaim it with
fleetest remote unlock --runner <machine>|local [--force]. Without--forceit releases only your own lock;--forcereleases it whoever holds it (this breaks that run if it is still going).
If you set your name in issuerId in ~/.config/fleetest/config.json, that name appears in these
messages. For setting up a runner shared by several people, see "When several people share one
runner" in Adding a Mac.
What is shared in a run across machines
The lock on this page (--wait-lock, remote unlock) is the runner occupancy lock: it only decides who may use a runner now. It is not the withRunLock of scenarios (run-wide lock).
- The run memo is one per run, shared by every machine of the run.
beforeAll()runs once per machine, so pass a machine-made value from it only in a class with@RunOnSingleMachine. beforeRun()/afterRun()run once, on the machine where you started fleetest (the runner machine forrun --runner <machine>) (run-wide preparation and cleanup).withRunLockworks across the machines of the run. A run profile whose devices name another machine inmachineis dispatched over ssh, so the run memo and run-wide locks work across all its machines; only a--fleetrun does without them.- In a
--fleetrun, a project with@RunHooksis refused at the start, a lock call fails at once with a reason, the run memo is per machine, and without--splitthe placement attributes (@RunOnSingleMachineetc.) do not apply.
Good to know
Runners on another network (across a router)
A runner does not have to be on the same LAN as your Mac. Any Mac you can reach with
ssh <destination> 'echo ok' works. Only whole run jobs travel over the network, so remote runs stay
fairly stable even with network latency.
- The only connection you open is SSH from your Mac to the runner. Your Mac does not need to accept incoming connections. File transfers, progress, artifact collection and live video all travel inside that one SSH connection.
- Put port numbers and jump hosts in
~/.ssh/config. An SSH destination cannot be written ashost:2222(destinations containing:or whitespace are rejected). Define an alias in~/.ssh/configwithHost mac2/HostName/Port/ProxyJump, and use that alias as the destination. - Do not expose the SSH port directly to the internet. Connecting over a VPN (Tailscale or similar) is the intended setup. If you must forward a port, forward only one, restrict the source IP addresses, and disable password authentication in the runner's sshd.
- Do not open Screen Sharing (port 5900) on the router. Instead, open a tunnel with
ssh -L 5900:localhost:5900 <destination>and connect tovnc://localhost:5900. - A slow link keeps working with reduced features instead of breaking. When live video
cannot be established, tiles switch to still images. While the connection is briefly down,
a tile shows
unknown. This means "the state could not be checked", not "free". Collecting recordings is what puts the heaviest load on the link.
When physical devices are attached to the runner, the network route from your Mac does not matter; only the runner's own LAN does. Over USB, nothing needs to be configured. A LAN-attached iPhone listens and the Mac connects to it, so no firewall change is needed on the Mac either. You do need both of the following:
- The runner and the device are on the same subnet
- Client isolation (privacy separator) on the access point is turned off
Maintaining runner machines
Nobody looks at a runner machine's results, reports, and recordings the way you look at your own, so
they pile up unnoticed. Run fleetest remote clean --runner <machine> from time to time. You can check the free
space with fleetest remote status --runner <machine> (--runner is required). remote clean deletes results, reports and recordings older than
7 days (change it with --keep-days <days>; artifacts are already collected to your Mac after every run). It stops if a test is running (--ignore-lock overrides this, but kills that run).
When you update fleetest on your Mac, bring the runner machines to the same version too (see "When you update fleetest" in Adding a Mac).
Using it safely
- The only path is SSH with key-based authentication. No password prompt is used, and relaxed host-key checking is never used.
- Every argument sent to the runner is quoted.
- Trust model: the runner machine itself is trusted (SSH access already means it can execute arbitrary code as that user). What comes back from the runner, however, is treated as external input.
- The runner ends up holding keys, sources, scenarios, reports, and recordings. Recordings and screenshots can show credentials typed during a test. In a shared lab other users can read them too, so do not put production credentials in scenarios or profiles.
- For using a runner machine across a router, see "Runners on another network (across a router)" above.