Mobster vs XCUITest
Keep XCUITest. Your coding agent tests each SwiftUI screen in plain English from outside your Xcode project, with no test target or test code.
| Feature | Mobster | |
|---|---|---|
| Test target | None | One in your Xcode project |
| A test is written in | Plain English | Swift or Objective-C |
| Your coding agent | Drives and tests over MCP | Writes test code |
| Who performs the steps | Your coding agent, or Mobster | Your test code |
| Proof for each result | Frames and an HTML report | An .xcresult bundle |
| Simulators | Its own, headless, reset each run | The ones you manage in Xcode |
| Keep a run as a test | One flag, or save_check | Xcode’s record button |
| A real iPhone | Over USB | With Xcode |
| Price | Free | Free with Xcode |
Pick Mobster if a coding agent writes your SwiftUI screens.
Four reasons to pick Mobster
1. Your coding agent checks the screen it wrote
An agent that changes a SwiftUI view needs to know the view works before it says so. With Mobster it builds for the simulator, calls verify_start with the steps in plain English and what must be true, drives the app with screen, tap, type_text and swipe, and calls verify_finish. The expectations are fixed before the agent touches the app, so it can’t bend them to fit what it sees. There’s no test target to add and no test code to compile. Add this to CLAUDE.md or AGENTS.md to ask your agent to verify each UI change:
## Verifying UI changesAfter you change a screen in this iOS app, verify it before you say it works.1. Build for the simulator: xcodebuild -scheme <Scheme> -destination 'generic/ platform=iOS Simulator' -derivedDataPath .mobster/ build CODE_SIGNING_ALLOWED=NO build2. Call mobster's verify_start with app_path set to the absolute path of .mobster/ build/ Build/ Products/ Debug-iphonesimulator/ <App>.app, the steps in plain English, and expect: what must be true when the steps are done.3. Drive with screen, tap, type_text and swipe, then call verify_finish.4. If the verdict is failed, fix the code and verify again. Report the verdict and the report path.2. A check is a small file anyone can read
A check of your app’s checkout, as .mobster/:
# Mobster installs your app, backs a reward and checks checkout# against the accessibility tree.# mobster verify --check .mobster/ checks/ checkout-total.yamlversion: 1name: Checkout adds shipping to the totalapp: bundle: com.kickstarter.kickstarter path: .mobster/ build/ Build/ Products/ Debug-iphonesimulator/ Kickstarter.appsteps: - Back the Early Bird kettleexpect: - text: Total amount - text: $89 - visible: { label: Continue, role: button } - no_text: Loadingmobster verify --check runs it, and the exit code is the verdict. Any run becomes a file like this with --save, or with save_check from your agent.
3. Evidence you can inspect
Every run writes frames, an overlay that outlines every element Mobster read and each asserted element in green or red, result.json, and a one-file HTML report with no external requests. When text isn’t found, the assertion line lists up to 5 near misses from the screen, to help you and your agent inspect the failure.
4. Simulators handled for you, and your iPhone too
Mobster creates its own simulators, boots them headless, builds WebDriverAgent once per Xcode version and resets the app before each run. It never opens Simulator.app and never touches your own simulators. On your USB iPhone, with Developer Mode on, mobster verify --device checks an app you already installed there, without clearing its data.
When XCUITest fits
Keep XCUITest for the regression suite that compiles with your app and runs in any CI or Xcode Cloud. Give the controls you check an accessibility identifier, such as .accessibilityIdentifier("tasks_left"), and XCUITest queries and the id selector in Mobster both use it.
Try Mobster on your app
Get Mobster for Mac, press Add next to your coding agent in Settings › Connectors, and build your app for the simulator:
xcodebuild -scheme <Scheme> -destination 'generic/ platform=iOS Simulator' \ -derivedDataPath .mobster/ build CODE_SIGNING_ALLOWED=NO buildThen ask your agent for a launch-only check, which calls no model and needs no key:
Use mobster to open .mobster/ build/ Build/ Products/ Debug-iphonesimulator/ <App>.appwith no steps, and expect "Welcome" on the first screen.Replace "Welcome" with text your first screen shows. Mobster for Mac also sets up your iPhone, with a live view and history, for free (AI runs on a supported AI plan, an API key or a model on your Mac).
Getting started with verify walks through the rest, and Maestro vs XCUITest vs Mobster adds Maestro to the comparison.
Questions
Is Mobster a replacement for XCUITest?
For your coding agent's checks, yes: it checks a screen with no test code and no test target. For a regression suite in CI and Xcode Cloud, keep XCUITest, and let your agent check each screen with Mobster while it works.
Does Mobster need a UI test target?
No. It installs the .app you build for the iOS Simulator with CODE_SIGNING_ALLOWED=NO, and reads the app's accessibility tree through WebDriverAgent, an XCTest runner of its own.
Do accessibility identifiers work in both?
Yes. The id selector in Mobster matches the accessibility identifier you set with .accessibilityIdentifier in SwiftUI, the same identifier an XCUITest query uses. One identifier serves both.
Related posts
Sources
XCUITest’s logo is a trademark of Apple, shown only to name the product. Mobster isn’t affiliated with or endorsed by Apple.