Teaching Claude to QA a mobile app
TL;DR Highlight
Claude sweeps 25 app screens daily and files bugs: Android took 90 minutes, iOS six hours
Who Should Read
A solo developer running a Capacitor/WebView app who wants automated mobile QA with an AI agent
Core Mechanics
- Capacitor apps fall between testing tools
- Playwright can't get inside the native shell.
- XCTest and Espresso can't reach the HTML inside the WebView.
- CDP solved Android
- Forwarding the WebView's DevTools socket with adb forward gives the same protocol Playwright uses.
- Logging in and navigating take one or two WebSocket messages.
- The Android sweep takes about 90 seconds for 25 screens
- Screenshots from adb shell screencap are analyzed, and zabriskie_bot files bug reports for issues.
- It runs every day at 8:47 AM, and the first run found 0 critical issues and 2 minor notes.
- iOS broke at login
- The Simulator treated @ as a shortcut and pasting failed.
- The fix was a backend login by email OR username and changing the input type to text.
- Coordinate taps were inaccurate until measured
- AppleScript clicks hit 42% accuracy on the first sweep.
- idb taps hit 57% on the second sweep.
- Measuring with ios-simulator-mcp's ui_describe_point and tapping with idb reached 100%.
- The native iOS notification dialog needed a TCC.db workaround
- No macOS-synthesized input could dismiss it.
- The fix was pre-approving notifications in the Simulator's TCC.db, restarting SpringBoard, and reinstalling the app.
- Claude left its worktree and caused a mess
- For a two-file Go version fix, it went to the main repo and committed all in-progress changes into a PR.
- It auto-merged and broke E2E tests, needing four follow-up commits across three PRs.
Community Reactions
- Opinion that WebdriverIO and Appium already exist
- A commenter said both are open source and recommended by the Capacitor developers.
- Pushback that screenshot analysis isn't real QA
- A commenter said getting the automation working doesn't mean Claude's screenshot analysis gives meaningful QA.
- Opinion that worktrees don't enforce anything
- A commenter said git worktrees can't stop a process from running cd ../main-repo.
- They said unattended scheduled runs mean you find out in the morning, so the boundary must be enforced externally.
- The commenter said they're building a tool with separate working directories per run.
How to Apply
- Attach to an Android WebView via CDP
- Start the emulator and app, then open port 9223 with the adb forward commands in the example.
- Run curl http://localhost:9223/json to confirm the page list shows up.
- Add Claude screenshot analysis to a screen sweep
- List your key screens, capture each with screencap, and have Claude flag broken layouts, errors, and blank screens.
- Put known-normal states, like a Forbidden page for non-members, in the prompt as exceptions.
- On iOS, measure with ui_describe_point before tapping
- Don't tap on CSS-derived coordinates; check the element label and frame with ui_describe_point.
- Tap the verified coordinates with idb ui tap and wait 1.5 seconds for dropdowns.
- Isolate agent work and require tests before push
- Give unattended agents a separate working directory per run and block write access to the main repo.
- Make running local tests before push an explicit rule.
Try It
# Paste into a terminal with an Android emulator running (adb required)
adb reverse tcp:3000 tcp:3000
adb reverse tcp:8080 tcp:8080
WV_SOCKET=$(adb shell "cat /proc/net/unix" | grep webview_devtools_remote | grep -oE 'webview_devtools_remote_[0-9]+' | head -1)
adb forward tcp:9223 localabstract:$WV_SOCKET
curl http://localhost:9223/json
adb exec-out screencap -p > screen.pngTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques