Patrol

Integration and UI testing framework for Flutter that extends Flutter's built-in integration_test package with native interaction capabilities. Patrol solves Flutter integration test's biggest limitation: the inability to interact with native OS dialogs (permission prompts, notifications, system alerts, keyboard). Key features: native UI interaction (tap system permission dialogs), notification testing, deep link testing, uninstall/reinstall apps, and a parallel test runner (patrol_cli). Works alongside Flutter Driver and integration_test but adds native OS layer access.

Evaluated Mar 06, 2026 (0d ago) v3.x
Homepage ↗ Repo ↗ Developer Tools flutter dart testing e2e integration-testing ui-testing ios android native
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
92
/ 100
Is it safe for agents?
⚡ Reliability
76
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
80
Auth Simplicity
98
Rate Limits
98

🔒 Security

TLS Enforcement
98
Auth Strength
95
Scope Granularity
90
Dep. Hygiene
85
Secret Handling
90

Test framework — no production security concerns. CI device access must be restricted. Test credentials should use test-specific accounts. Permission grants during tests should be revoked after test run.

⚡ Reliability

Uptime/SLA
80
Version Stability
75
Breaking Changes
70
Error Recovery
80
AF Security Reliability

Best When

You're writing Flutter integration tests that need to interact with native OS dialogs (permissions, notifications, system alerts) — Patrol is the only Flutter-native solution for testing these interactions.

Avoid When

Your tests don't need native OS interactions (use integration_test directly), you need non-Flutter app testing, or your CI doesn't have iOS/Android simulators.

Use Cases

  • Test agent app permission flows in Flutter — grant/deny camera, microphone, or location permissions using Patrol's native dialog interaction that integration_test cannot access
  • Automate end-to-end agent onboarding flows that include push notification permission prompts — Patrol can tap iOS/Android permission dialogs during test execution
  • Run Flutter integration tests in parallel across devices using patrol_cli — scale agent app E2E test suite with parallel execution on multiple simulator/emulator instances
  • Test deep link handling in agent apps — Patrol can open custom URL schemes and universal links to test agent deep link routing
  • Verify agent background processing and notification delivery — Patrol can interact with notification banners and verify notification content in the device notification tray

Not For

  • Unit and widget tests — Patrol is for integration/E2E tests that require device or simulator; use flutter_test for unit and widget tests
  • Non-Flutter native apps — Patrol is Flutter-specific; use Detox (React Native), XCUITest (iOS), or Espresso (Android) for native app testing
  • Simple integration tests without native interactions — Flutter's built-in integration_test package is simpler if you don't need to interact with system dialogs or notifications

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Testing framework — no auth concepts. Tests authenticate via the app under test, not Patrol itself.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Patrol is Apache 2.0 licensed, maintained by LeanCode. Free for all use.

Agent Metadata

Pagination
none
Idempotent
Partial
Retry Guidance
Not documented

Known Gotchas

  • patrol_cli required for parallel execution — `patrol test` via patrol_cli handles device discovery and parallel runs; running tests with `flutter test integration_test/` misses Patrol's native bridging layer
  • Native permissions persist between test runs — iOS/Android device permission state carries across test sessions; use $.native.grantPermissionWhenInUse() explicitly in test setup and revoke after; CI should reset app between test suites
  • iOS requires physical device or simulator with hardware permissions — certain permission dialogs (Face ID, NFC) only appear on physical devices; plan test matrix accordingly
  • Patrol version alignment — patrol, patrol_cli, and patrol_finders must have compatible versions; version mismatch causes cryptic gRPC bridge errors between test runner and device agent
  • Flutter integration_test coexistence — Patrol extends integration_test but adds its own server on device; both must be configured; patrolTest() wraps integration test runner — don't mix patrolTest and testWidgets in same file
  • Simulator notification permissions require OS version — iOS 16+ changed notification permission dialog behavior; Patrol's native interaction for notifications may vary by iOS version; test on representative OS versions

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Patrol.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered