Flutter integration tests, Patrol and AI agents: what to script and what to let an agent check.
Facts from the Flutter integration test docs, Patrol docs and Patrol MCP, checked October 13, 2026.
Three ways to check a Flutter app on Android
| integration_test | Patrol 4 | AI agent on Phonebox | |
|---|---|---|---|
| You write | Dart tests with WidgetTester | Dart tests with native UI access | A plain-language task |
| Native dialogs and notifications | No | Yes | Yes, it reads and taps the whole screen |
| Runs on | Emulator or device | Emulator, device or device farm | A cloud Android phone |
| MCP server | None | patrol_mcp, official | Hosted at phonebox.dev/mcp |
| Needs | The Flutter SDK | Flutter 3.32+, Android SDK 21+ | The APK |
Add an agent check to each build
Build the APK with flutter build apk, then give your coding agent the phone and the scope:
Build the debug APK and install it on my Phonebox phone.
Walk through the onboarding and settings screens I changed in this branch.
Read the screen before every action. Report anything that looks broken,
with the screen text you saw. Park the phone when you finish.Phonebox phones don't expose ADB, so integration_test and Patrol suites keep running on an emulator or device farm; the agent checks the same APK on a cloud phone.
Questions
What is the difference between Flutter integration_test and Patrol?
integration_test ships with the Flutter SDK and drives the app through WidgetTester. Patrol, from LeanCode, builds on it and adds access to native UI such as permission dialogs, notifications and WebViews, plus a CLI and an official MCP server, patrol_mcp.
Can an AI agent test a Flutter app on Android?
Yes. With a Phonebox cloud Android phone, a coding agent such as Claude Code installs the Flutter APK, reads the screen, taps and types through the flows you name, and reports what it saw.