scripts/soak_fleet.py asks each phone’s helper the same read-only questions in a loop and tells you how long each answer took and how often it failed. Run it before you rely on a row of phones, after you add a hub or a phone, and after an iOS update.
It sends GET requests only. It sends no tap, swipe or key, creates no session and never unlocks a phone. It stops reading a phone the moment its owner starts using it (Your iPhone stays yours).
Run it
Try it without a phone first. The built-in fake fleet needs no cable and nomobster serve:
mobster serve:
--serve can’t see a phone’s address: the first phone is on 8100, and the others on 8101, 8102 and up in the order the server lists them. If you forgot a phone, pass --phone for each one.
The lock is a directory made with mkdir before the first read. A held lock stops the run, and the script removes the directory only if it made it.
Run it on more phones
- Connect each phone with its own cable. A powered USB hub works; plug the hub into the Mac directly, not through a keyboard or a display. Each phone has to be set up in Mobster once: Adding and setting up a device.
- Every phone gets WebDriverAgent on port 8100 plus its slot and live view on 9100 plus its slot (Ports).
mobster deviceslists them. - Unlock every phone and set Auto-Lock to Never for the run, so a locked screen isn’t counted as a failure. Put them down: an owner who picks one up ends that phone’s run, which the report shows as
stopped: owner_active. - Start with 5 phones for 5 minutes. Then add phones until the p99 of
screenshotorsourcerises or a failure rate leaves 0%: that is this Mac’s limit with this hub. Each phone’s reads run on their own thread, so the load on the Mac and the hub is what you are measuring. - Record: what you ran (flags, duration, interval), the Mac and hub, the phones’ models and iOS versions, the date, and the table. Keep the JSON with it.
What the numbers mean
- A failure is a timeout or an error from the helper, with the bound in
mobile_agent/wda_timeouts.py: 3 s for the first three steps, 10 s for the others. The error names are in the JSON undererrors. - A rising
screenshotp99 with a flatlockedp99 means the USB link or the phone is busy, not the helper. Watchdog restartsis how many times Mobster restarted a helper during the run (When the helper stops answering). Any restart during a soak run is worth reading the helper’s log for.