Skip to content
Back to search

patrol

Flutter-first UI testing framework. Ready for action!

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/leancodepl/patrol with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/leancodepl/patrol'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/leancodepl--patrol/badge.svg)](/listings/leancodepl--patrol)

HTML

<a href="/listings/leancodepl--patrol"><img src="/api/listings/leancodepl--patrol/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 248 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Patrol
  2. [![patrol on pub.dev][patrol_badge]][patrol_link]
  3. [![patrol_cli on pub.dev][patrol_cli_badge]][patrol_cli_link]
  4. [![patrol_finders on pub.dev][patrol_finders_badge]][patrol_finders_link]
  5. [![patrol_mcp on pub.dev][patrol_mcp_badge]][patrol_mcp_link]
  6. [![patrol_discord]][patrol_discord_link]
  7. [![code style][leancode_lint_badge]][leancode_lint_link]
  8. [![patrol_github_stars]][patrol_github_link]
  9. [![patrol_x]][patrol_x_link]
  10. A powerful, multiplatform E2E UI testing framework for Flutter apps that overcomes the limitations of integration_test by handling native interactions. Developed by LeanCode since 2022, battle-tested and shaped by production-grade experience.
  11. [![Patrol promotional graphics][promo_graphics]][docs]
  12. ## Learn more about Patrol:
  13. - [Our extensive documentation][docs]
  14. - [How Patrol 4.0 Makes Cross-Platform Flutter Testing Possible][article_4x]
  15. - [Simplifying Flutter Web Testing: Patrol Web][article_web]
  16. - [Patrol VS Code Extension - A Better Way to Run and Debug Flutter UI Tests][article_vscode]
  17. ## How can we help you:
  18. Patrol is an open-source framework created and maintained by LeanCode.
  19. However, if your company wants to scale fast and accelerate Patrol’s
  20. adoption, we offer a set of value-added services on top of the core framework.
  21. You can find out more below:
  22. - 🚀 [Automate Flutter app testing with Patrol][automate_flutter_app_testing_with_patrol]
  23. - 🚀 [Patrol Setup & Patrol Training][patrol_setup_and_training]
  24. > [!NOTE]
  25. > **Patrol 4.7.0 adds Swift Package Manager support for iOS and macOS!**
  26. > If you migrate your project to SPM, a few small setup changes are needed — see the [iOS setup][docs_ios_setup_spm] guide for details.
  27. ## Patrol custom finders
  28. Flutter's finders are powerful, but not very intuitive to use.
  29. We took them and made something awesome.
  30. Thanks to Patrol's custom finders, you'll take your tests from this:
  31. ```dart
  32. testWidgets('signs up', (WidgetTester tester) async {
  33. await tester.pumpWidget(AwesomeApp());
  34. await tester.pumpAndSettle();
  35. await tester.enterText(
  36. find.byKey(Key('emailTextField')),
  37. 'charlie@root.me',
  38. );
  39. await tester.pumpAndSettle();
  40. await tester.enterText(
  41. find.byKey(Key('nameTextField')),
  42. 'Charlie',
  43. );
  44. await tester.pumpAndSettle();
  45. await tester.enterText(
  46. find.byKey(Key('passwordTextField')),
  47. 'ny4ncat',
  48. );
  49. await tester.pumpAndSettle();
  50. await tester.tap(find.byKey(Key('termsCheckbox')));
  51. await tester.pumpAndSettle();
  52. await tester.tap(find.byKey(Key('signUpButton')));
  53. await tester.pumpAndSettle();
  54. expect(find.text('Welcome, Charlie!'), findsOneWidget);
  55. });
  56. ```
  57. to this:
  58. ```dart
  59. patrolTest('signs up', (PatrolIntegrationTester $) async {
  60. await $.pumpWidgetAndSettle(AwesomeApp());
  61. await $(#emailTextField).enterText('charlie@root.me');
  62. await $(#nameTextField).enterText('Charlie');
  63. await $(#passwordTextField).enterText('ny4ncat');
  64. await $(#termsCheckbox).tap();
  65. await $(#signUpButton).tap();
  66. await $('Welcome, Charlie!').waitUntilVisible();
  67. });
  68. ```
  69. [Learn more about custom finders in the docs][docs_finders]!
  70. Patrol's custom finders are also available standalone in [the patrol_finders
  71. package][patrol_finders_link].
  72. ## Patrol native automation
  73. Flutter's default [integration_test] package can't interact with the OS your
  74. Flutter app is running on. This makes it impossible to test many critical
  75. business features, such as:
  76. - granting runtime permissions
  77. - signing into the app which through WebView or Google Services
  78. - tapping on notifications
  79. - [much more!](https://patrol.leancode.co/native/feature-parity)
  80. Patrol's native automation feature solves these problems:
  81. ```dart
  82. void main() {
  83. patrolTest('showtime', (PatrolIntegrationTester $) async {
  84. await $.pumpWidgetAndSettle(AwesomeApp());
  85. // prepare network conditions
  86. await $.platform.mobile.enableCellular();
  87. await $.platform.mobile.disableWifi();
  88. // toggle system theme
  89. await $.platform.mobile.enableDarkMode();
  90. // handle native location permission request dialog
  91. await $.platform.mobile.selectFineLocation();
  92. await $.platform.mobile.grantPermissionWhenInUse();
  93. // tap on the first notification
  94. await $.platform.mobile.openNotifications();
  95. await $.platform.mobile.tapOnNotificationByIndex(0);
  96. });
  97. }
  98. ```
  99. ## CLI
  100. See [packages/patrol_cli][github_patrol_cli].
  101. The CLI is needed to enable Patrol's native automation feature in integration
  102. tests. It also makes development of integration tests much faster thanks to [Hot
  103. Restart].
  104. To run widget tests, you can continue to use `flutter test`.
  105. ## Package
  106. See [packages/patrol][github_patrol].
  107. ## CI/CD Workflows
  108. See [.github/WORKFLOWS.md][github_workflows] for detailed documentation about all GitHub Actions workflows, including test schedules, Flutter versions, and deployment pipelines.
  109. ## Patrol contracts generator
  110. 1. (Optionally) add new request type:
  111. ```dart
  112. class OpenAppRequest {
  113. late String appId;
  114. }
  115. ```
  116. 2. Add new method to `NativeAutomator`:
  117. ```dart
  118. abstract class NativeAutomator<IOSServer, AndroidServer, DartClient> {
  119. ...
  120. void openApp(OpenAppRequest request);
  121. ...
  122. }
  123. ```
  124. 3. Run `gen_from_schema` script, few files will be updated
  125. ## Develop patrol_cli
  126. If you have previously activated patrol_cli run:
  127. ```bash
  128. dart pub global deactivate patrol_cli
  129. ```
  130. then
  131. ```bash
  132. cd packages/patrol_cli
  133. flutter pub global activate -s path .
  134. ```
  135. ## 🛠️ Maintained by LeanCode
  136. <div align="center">
  137. <a href="https://leancode.co/?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme">
  138. <img src="https://leancodepublic.blob.core.windows.net/public/wide.png" alt="LeanCode Logo" height="100" />
  139. </a>
  140. </div>
  141. This package is built with 💙 by **[LeanCode](https://leancode.co?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme)**.
  142. We are **top-tier experts** focused on Flutter Enterprise solutions.
  143. ### Why LeanCode?
  144. - **Creators of [Patrol](https://patrol.leancode.co/?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme)** – the next-gen testing framework for Flutter.
  145. - **Production-Ready** – We use this package in apps with millions of users.
  146. - **Full-Cycle Product Development** – We take your product from scratch to long-term maintenance.
  147. <div align="center">
  148. <br />
  149. **Need help with your Flutter project?**
  150. [**👉 Hire our team**](https://leancode.co/get-estimate?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme)
  151. &nbsp;&nbsp;•&nbsp;&nbsp;
  152. [Check our other packages](https://pub.dev/packages?q=publisher%3Aleancode.co&sort=downloads)
  153. </div>
  154. [patrol_badge]: https://img.shields.io/pub/v/patrol?label=patrol
  155. [patrol_finders_badge]: https://img.shields.io/pub/v/patrol_finders?label=patrol_finders
  156. [patrol_mcp_badge]: https://img.shields.io/pub/v/patrol_mcp?label=patrol_mcp
  157. [patrol_cli_badge]: https://img.shields.io/pub/v/patrol_cli?label=patrol_cli
  158. [leancode_lint_badge]: https://img.shields.io/badge/code%20style-leancode__lint-black
  159. [patrol_github_stars]: https://img.shields.io/github/stars/leancodepl/patrol
  160. [patrol_x]: https://img.shields.io/twitter/follow/patrol_leancode
  161. [patrol_discord]: https://img.shields.io/discord/1167030497612922931?color=blue&logo=discord
  162. [patrol_link]: https://pub.dev/packages/patrol
  163. [patrol_finders_link]: https://pub.dev/packages/patrol_finders
  164. [patrol_mcp_link]: https://pub.dev/packages/patrol_mcp
  165. [patrol_cli_link]: https://pub.dev/packages/patrol_cli
  166. [leancode_lint_link]: https://pub.dev/packages/leancode_lint
  167. [patrol_x_link]: https://x.com/patrol_leancode
  168. [patrol_github_link]: https://github.com/leancodepl/patrol
  169. [patrol_discord_link]: https://discord.gg/ukBK5t4EZg
  170. [github_patrol]: https://github.com/leancodepl/patrol/tree/master/packages/patrol
  171. [github_patrol_cli]: https://github.com/leancodepl/patrol/tree/master/packages/patrol_cli
  172. [github_workflows]: https://github.com/leancodepl/patrol/blob/master/.github/WORKFLOWS.md
  173. [docs]: https://patrol.leancode.co/?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme
  174. [docs_finders]: https://patrol.leancode.co/finders/overview
  175. [docs_ios_setup_spm]: https://patrol.leancode.co/documentation?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme#ios-setup-configure-runner-uitests
  176. [promo_graphics]: assets/promo_banner.png
  177. [article_web]: https://leancode.co/blog/patrol-web-support?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme
  178. [article_4x]: https://leancode.co/blog/patrol-4-0-release?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme
  179. [article_vscode]: https://leancode.co/blog/patrol-vs-code-extension?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme
  180. [integration_test]: https://github.com/flutter/flutter/tree/master/packages/integration_test
  181. [automate_flutter_app_testing_with_patrol]: https://leancode.co/products/automated-ui-testing-in-flutter?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme
  182. [patrol_setup_and_training]: https://leancode.co/products/patrol-setup-training?utm_source=github.com&utm_medium=referral&utm_campaign=patrol-readme

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.