r/iOSProgramming • u/Cylicium • 4d ago
News I built a GitHub Actions workflow where Claude Code agents beta-test mobile apps, each on its own emulator
I built this with Claude Code. Each tester is a Claude Code agent run headless (claude -p) with its own Android emulator or iOS Simulator and a persona: a retired teacher using large text, a student who skips every text, someone reading Arabic right to left. It uses the app like a new user and writes a bug report with numbered screenshots.
How Claude Code helped: it wrote most of the scripts with me, like the build step for each framework (Flutter, React Native, Expo, native Kotlin and Swift...), the encryption of the reports since a public repo's logs are public, and tests that fake flutter and gh so CI runs offline. I reviewed every change and ran real sessions on LocalSend and AnkiDroid to find what broke.
Free to try: it's MIT and runs on GitHub's free runners from a public repo. You need the gh CLI and a Claude subscription or API key. Create a repo from the template, run ./setup.sh, then start the workflow. On the demo app, 4 testers found 9 of the 11 planted bugs for $0.87 of model usage.
It went from 57 to about 1,270 stars in two days after a share on X, and a few people already run it on their own apps. What would you want it to check on yours?
1
u/jacobs-tech-tavern 20h ago
This is nice, does it work on the standard runners or does it need hosted MacOS runners?
1
u/Oikon__ 3d ago
running claude -p headless with a persona per tester is such a fun way to do this, basically AI user testing instead of scripted E2E. the $0.87 number is cool but the run I'd worry about is the one persona that gets stuck on some modal and keeps tapping for many turns.
1
u/mrdzyn 3d ago
Beyond first-run happy paths, the two things I'd want an agentic tester to stress-test on iOS are network flakiness and lifecycle interruptions.
Specifically: dropping connectivity mid-request (airplane mode or throttled network via
simctl/ Network Link Conditioner), backgrounding the app halfway through an onboarding or checkout flow and foregrounding it again, and rotating or resizing on iPad / Duo layouts. Those are the bugs that rarely show up in unit tests or clean simulator runs, and an exploratory agent is actually well suited to trigger them.1
u/Stunning-Farmer185 2d ago
i built simulator-use (free, MIT) so i'm biased, but +1 on reading the screen as text instead of screenshots. on ios it gives claude the screen as a few lines of labels and ids and taps by label, and it handles the stuck-on-a-modal case: a tap that changes nothing gets reported, and if an alert is in front it says to answer it first and names its buttons. it can also set the simulator's text size and locale, so your large text and arabic personas are one call each.
it's an mcp server or a cli (npx simulator-use look), so it should drop into claude -p on the macos runner. cool project, the personas are a fun idea. https://simulator-use.dev
1
u/Successful-Tax1306 1d ago
I tried something close with a test agent on a side project. The part that surprised me was how many of its bug reports were just it not knowing the app, like tapping through a login it had never seen. What helped was giving it one short note on the happy path first, so the real bugs stood out from the confusion.
1
u/DimensionMindless336 4d ago
The personas are the interesting part here — but note what they actually are: large text, skips-text, RTL. Those are Dynamic Type / visual hierarchy / localization scenarios more than personalities, and all three are things you can measure a lot more reliably from the view hierarchy than from a screenshot.
What worked for me was changing the observation channel: dump the accessibility tree (
idb ui describe-allon iOS,uiautomator dumpon Android) and let the agent reason over labels, traits and frames, with screenshots attached to the bug report as evidence rather than fed in as the input. Then "does this label overflow at 200% Dynamic Type" and "does this tappable control have any accessibility label at all" become deterministic assertions instead of a model squinting at a picture. It's also a few KB of tree instead of a stack of images, so you get more testers for your $0.87.The other thing I'd want it to check: right now every tester is a new user on a cold simulator, so you only ever test first-run. The bugs that actually bite are returning-user states — onboarding dismissed, notifications denied, session expired, a half-finished form from last week. CI simulators start with clean TCC state, so permission prompts either get auto-denied or hang headless. Worth seeding a couple of pre-states before the agent starts (set permissions / plant a UserDefaults value via simctl), and giving each persona a concrete task ("send a message as the large-text user") rather than free exploration. Task completion is a much better signal than "found 9 of 11 planted bugs" — great demo number, but that mostly measures how visible the planted bugs were.
Curious how you're handling the RN/Expo build on Apple Silicon runners — that's where I've seen pipelines like this fall over most often.