patrol-e2e-testing
Use when writing E2E/integration tests, testing native interactions like permissions or system dialogs, capturing UI regressions, or validating cross-platform behavior (Patrol 4.x).
Install / Use
npx skills add evanca/flutter-ai-rules --skill patrol-e2e-testingInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
CommunicationSupported Platforms
Our assessment of patrol-e2e-testing
patrol-e2e-testing scores 87/100 on our quality scale, 256th of 446 Communication skills we index.
Its SKILL.md is 5.5 KB long, well organised into 12 sections with 14 code examples: a solid amount of guidance for an agent.
It has 646 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 19 days ago, so patrol-e2e-testing is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
patrol-e2e-testing compared with similar skills
All 4 of these similar skills score higher than patrol-e2e-testing; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| patrol-e2e-testing (this skill)by evanca | 87 | 646 | 19d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install patrol-e2e-testing?
- Run
npx skills add evanca/flutter-ai-rules --skill patrol-e2e-testing. The install tabs above show the steps for each supported agent. - Which AI agents does patrol-e2e-testing work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is patrol-e2e-testing safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is patrol-e2e-testing still maintained?
- The repository was last updated 19 days ago, so patrol-e2e-testing is actively maintained.
Skill content
View source on GitHubname: patrol-e2e-testing description: "Use when writing E2E/integration tests, testing native interactions like permissions or system dialogs, capturing UI regressions, or validating cross-platform behavior (Patrol 4.x)." license: MIT
Patrol E2E Testing Skill
Design, implement, and run end-to-end (E2E) tests using Patrol 4.x in Flutter projects.
When to Use
Use this skill when:
- A new screen or user flow needs E2E test coverage.
- A feature interacts with native components (permissions, notifications, system dialogs, deep links).
- A UI bug should be captured as a regression test.
- Cross-platform behavior (Android / iOS / Web) must be validated.
- Setting up Patrol in a new or existing Flutter project.
Setup
Follow the official Patrol documentation for installation and project initialization: https://patrol.leancode.co/documentation#setup
Key Patrol conventions:
- Add
patrolas a dev dependency. - Place tests in
patrol_test/. - Name test files with a
_test.dartsuffix. - Execute tests with
patrol test.
Workflow
Follow these steps when implementing or updating Patrol tests.
1. Identify the user journey
Break the feature into:
- Actions: taps, scrolls, input, navigation, deep links.
- Observable outcomes: visible text, screen changes, enabled buttons, dialogs.
Rules:
- One test per primary (happy-path) journey.
- Separate tests for critical edge cases.
- Avoid combining unrelated flows in a single test.
2. Structure the Patrol test
Basic Patrol structure:
import 'package:flutter_test/flutter_test.dart';
import 'package:patrol/patrol.dart';
void main() {
patrolTest(
'user can log in successfully',
($) async {
await $.pumpWidgetAndSettle(const MyApp());
const email = String.fromEnvironment('E2E_EMAIL');
const password = Stri…[redacted]('E2E_PASSWORD');
await $(#emailField).enterText(email);
await $(#passwordField).enterText(password);
await $(#loginButton).tap();
await $.waitUntilVisible($(#homeScreenTitle));
expect($(#homeScreenTitle).text, equals('Welcome'));
},
);
}
Key concepts:
- Use
patrolTest()instead oftestWidgets(). $is the Patrol tester.- Use
$(#keyName)to find widgets byKey. - Use explicit wait conditions (e.g.,
waitUntilVisible).
3. Handle native dialogs
For OS-level permission dialogs:
patrolTest('grants camera permission', ($) async {
await $.pumpWidgetAndSettle(const MyApp());
await $(#openCameraButton).tap();
if (await $.native.isPermissionDialogVisible()) {
await $.native.grantPermission();
}
await $.waitUntilVisible($(#cameraPreview));
});
Use native automation only when required by the feature.
4. Selector & interaction quick reference
Finding widgets:
$('some text') // by text
$(TextField) // by type
$(Icons.arrow_back) // by icon
Tapping:
// Tap a widget containing a specific text label
await $(Container).$('click').tap();
// Tap a container that contains an ElevatedButton
await $(Container).containing(ElevatedButton).tap();
// Tap only the enabled ElevatedButton
await $(ElevatedButton)
.which<ElevatedButton>(
(b) => b.enabled,
)
.tap();
Entering text:
// Enter text into the second TextField on screen
await $(TextField).at(1).enterText('your input');
Scrolling:
await $(widget_you_want_to_scroll_to).scrollTo();
Native interactions:
// Grant permission while app is in use
await $.native.grantPermissionWhenInUse();
// Open notification shade and tap a notification by text
await $.native.openNotifications();
await $.native.tapOnNotificationBySelector(
Selector(textContains: 'text'),
);
5. Running Patrol tests
Run all tests:
patrol test
Run a specific file with live reload (development mode):
patrol develop -t integration_test/my_test.dart
Run a specific file:
patrol test --target patrol_test/login_test.dart
Run on web:
patrol test --device chrome
Headless web (CI):
patrol test --device chrome --web-headless true
Filter by tags:
patrol test --tags android
6. Stabilization patterns
Flaky tests undermine confidence. Apply these patterns:
// AVOID — arbitrary delay
await Future.delayed(Duration(seconds: 3));
// PREFER — explicit wait condition
await $.waitUntilVisible($(#targetWidget));
// For animations, pump until settled
await $.pumpAndSettle();
- Never use
Future.delayedas a synchronization mechanism. - Use
waitUntilVisibleorwaitUntilExiststo wait for UI state. - Set
settleTimeoutinPatrolTesterConfigfor slow CI environments.
Output requirements
When applied, this skill produces:
- Patrol test(s) covering the specified feature.
- Any required widget
Keyadditions to production code. - Exact
patrol testcommand(s) to execute locally. - Notes explaining stabilization or timing decisions.
Checkpoint: Run patrol test --target <file> locally to confirm the test passes before committing.
Quality bar
A valid Patrol test must be:
- Deterministic — no arbitrary delays; uses explicit wait conditions.
- Readable — clear test name describing the user journey.
- Minimal but complete — one assertion chain per journey.
- Secret-safe — credentials loaded from
String.fromEnvironment, never hardcoded. - CI-ready — passes headless with
--web-headless trueor on emulator.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
