The unit tests from the previous lesson guard the logic underneath the AI Usage Insights feature, but nothing so far has verified what a person actually experiences, when they tap through the app. That’s a different kind of testing: instead of asserting on a return value, you’re asserting on what appears on screen after a real interaction.
Xcode 27 exposes the iOS simulator through MCP, which means an AI agent can drive a running app directly — tap buttons, scroll lists, read what’s on screen — the same way a QA engineer would, without you writing a single line of automation first. In this lesson, you’ll turn the reviewed feature plan into a set of plain-English test steps — actions to take in the app, and expectations to find on screen — and have the agent execute those steps itself, live against the simulator, rather than generating test code for someone else to run.
Not every question is answered by what’s on screen, though. Sometimes you need to know what’s happening underneath the UI — what a variable actually held at a given moment. You’ll see how an AI agent can set its own breakpoints in Xcode, run the app, and when execution stops, print the data it needs straight to the console — effectively debugging the app the same way you would, by stepping through code and reading what comes out of the debug session.
Driving the simulator through screenshots on every step is not cheap: each screenshot is fresh, uncached tokens, so this approach trades token cost for the ability to test the app, the way a user actually experiences it. Keep that trade-off in mind when deciding where to spend it.
By the end of this lesson you’ll be able to:
Use an AI agent and Xcode’s simulator MCP to execute a UI test — actions and expectations — directly against a running app.
Have an AI agent set breakpoints and read console output from a live debug session to verify internal state.
Recognize the token cost of screenshot-driven simulator testing and when it’s worth paying.
See forum comments
This content was released on Oct 28 2026. The official support period is 6-months
from this date.
An overview of using Xcode 27’s simulator MCP to have an AI agent test the app, the way
a human would — executing the test steps itself against the running app — and to debug
the app directly through breakpoints and the console.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Quiz: Fix Bugs & Guard Them With Tests
Next: Testing the Running App With an AI Agent
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.