Agent skill

Patrol E2E Testing

by evanca in evanca/flutter-ai-rules

A skill your agent uses when writing E2E/integration tests, testing native interactions like permissions or system dialogs, capturing UI regressions, or validating cross-platform behavior (Patrol…

MITAuto-check passedTesting & QA

Install Patrol E2E Testing

skills CLI
$ npx skills add evanca/flutter-ai-rules --skill patrol-e2e-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evanca/flutter-ai-rules patrol-e2e-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/patrol-e2e-testing .claude/skills/patrol-e2e-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
patrol-e2e-testing
GitHub stars
649
Token cost
~1.4k tokens
SKILL.md length
392 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when writing E2E/integration tests, testing native interactions like permissions or system dialogs, capturing UI regressions, or validating cross-platform behavior (Patrol…

  • Works in 6 steps: Identify the user journey → Structure the Patrol test → Handle native dialogs → …
  • Writing E2E/integration tests
  • SKILL.md covers When to Use, Setup and Workflow
  • Needs E2E_PASSWORD

What it does

Patrol E2E Testing is an agent skill from evanca/flutter-ai-rules. 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).

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing and Integration testing. The repository describes itself as: Flutter AI Skills and Rules for Claude, Codex, Cursor, and Other AI-Powered IDEs. The licence is MIT.

When your agent uses it

  • Writing E2E/integration tests
  • Testing native interactions like permissions
  • Capturing UI regressions
  • Validating cross-platform behavior (Patrol 4.x)

Example prompts

  • “/patrol-e2e-testing”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Identify the user journey
  2. Structure the Patrol test
  3. Handle native dialogs
  4. Selector & interaction quick reference
  5. Running Patrol tests
  6. Stabilization patterns

What it can do on your machine

Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • patrol.leancode.co

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • E2E_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Patrol E2E Testing loads about 1.4k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 392 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 392 words, ~1,409 tokens.

Download SKILL.mdSave it as .claude/skills/patrol-e2e-testing/SKILL.md (or your agent's skills folder).
name
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 patrol as a dev dependency.
  • Place tests in patrol_test/.
  • Name test files with a _test.dart suffix.
  • 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:

dart
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 = String.fromEnvironment('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 of testWidgets().
  • $ is the Patrol tester.
  • Use $(#keyName) to find widgets by Key.
  • Use explicit wait conditions (e.g., waitUntilVisible).
3. Handle native dialogs

For OS-level permission dialogs:

dart
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:

dart
$('some text')        // by text
$(TextField)          // by type
$(Icons.arrow_back)   // by icon

Tapping:

dart
// 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:

dart
// Enter text into the second TextField on screen
await $(TextField).at(1).enterText('your input');

Scrolling:

dart
await $(widget_you_want_to_scroll_to).scrollTo();

Native interactions:

dart
// 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'),
);
Show full SKILL.md (163 more words)Show less
5. Running Patrol tests

Run all tests:

bash
patrol test

Run a specific file with live reload (development mode):

bash
patrol develop -t integration_test/my_test.dart

Run a specific file:

bash
patrol test --target patrol_test/login_test.dart

Run on web:

bash
patrol test --device chrome

Headless web (CI):

bash
patrol test --device chrome --web-headless true

Filter by tags:

bash
patrol test --tags android
6. Stabilization patterns

Flaky tests undermine confidence. Apply these patterns:

dart
// 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.delayed as a synchronization mechanism.
  • Use waitUntilVisible or waitUntilExists to wait for UI state.
  • Set settleTimeout in PatrolTesterConfig for slow CI environments.
Output requirements

When applied, this skill produces:

  1. Patrol test(s) covering the specified feature.
  2. Any required widget Key additions to production code.
  3. Exact patrol test command(s) to execute locally.
  4. 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 true or on emulator.

© evanca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/patrol-e2e-testing of evanca/flutter-ai-rules.

Open the folder on GitHubat commit 7b9cce2

Compare with similar skills

Patrol E2E Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Patrol E2E Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Patrol E2E Testing this skillevanca/flutter-ai-rules649—~1.4kAutomated safety check: PassMIT
Integration E2E Testingshinpr/claude-code-workflows691—~3.5kAutomated safety check: PassMIT
Add Acceptance Testtalkincode/toughradius691—~827Automated safety check: PassMIT
Integration E2E Testingshinpr/ai-coding-project-boilerplate232—~2.8kAutomated safety check: PassMIT
Migrate E2E To Integrationopenshift/oc-mirror124—~1.5kAutomated safety check: PassApache-2.0
Om Integration Testsgo-musicfox/go-musicfox2.6k1 repos~3.6kAutomated safety check: NotesGPL-3.0

Similar skills

  • Integration E2E Testing

    shinpr/claude-code-workflows

    Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria.

    691 GitHub stars~3.5k tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • Add Acceptance Test

    talkincode/toughradius

    Write CI-executable acceptance/integration tests for protocol or end-to-end changes (TR-F022).

    691 GitHub stars~827 tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Integration E2E Testing

    shinpr/ai-coding-project-boilerplate

    Selects and designs the smallest integration/E2E test set that proves accepted behavior at an observable boundary.

    232 GitHub stars~2.8k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Migrate E2E To Integration

    openshift/oc-mirror

    Migrate an oc-mirror e2e test case to the integration test suite, translating framework, registry, invocation, and assertion patterns

    124 GitHub stars~1.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Om Integration Tests

    go-musicfox/go-musicfox

    Run and create integration/E2E tests by exploring the live app with the configured browser provider, preserving repository-native runners, reusing the shared test environment, and diagnosing…

    2.6k GitHub starsUsed in 1 repo~3.6k tokens
    Testing & QAAuto-check: notes
  • Test Collaboration

    qshanx/docs-governance

    盘点并维护项目测试资产,把需求、业务规则、风险、Bug 和跨端接口契约转成 TEST-ID 与可验证证据,生成或更新 TESTS.md。用于测试资产盘点、测试缺口分析、单元/集成/契约/E2E/冒烟分类、Bug 回归保护、前后端或多服务基于同一契约的消费者/提供者测试、测试必要性判断、测试清单维护与交付前测试证据审查。中文触发:测试盘点、测试清单、测试资产、测试缺口、测试必要性、Bug…

    132 GitHub stars~1.1k tokensUpdated 3 days ago
    Testing & QAAuto-check passed

More from evanca/flutter-ai-rules

All 37 skills in this repo
  • Code Review

    evanca/flutter-ai-rules

    A skill your agent uses when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.

    649 GitHub stars~2.4k tokensUpdated 24 days ago
    Auto-check passed
  • Developing Genkit Dart

    evanca/flutter-ai-rules

    A skill your agent uses when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.

    649 GitHub stars~961 tokensUpdated 24 days ago
    Auto-check passed
  • Generate Images With Firebase AI

    evanca/flutter-ai-rules

    A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…

    649 GitHub stars~2.3k tokensUpdated 24 days ago
    Auto-check passed
  • Flutter Use Column Row First

    evanca/flutter-ai-rules

    A skill your agent uses when building any Flutter screen or component to choose responsive Row, Column, Expanded, Flexible, and Spacer layouts before fixed-size or coordinate-based alternatives.

    649 GitHub stars~1.3k tokensUpdated 24 days ago
    Auto-check passed
  • Architecture Feature First

    evanca/flutter-ai-rules

    A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.

    649 GitHub stars~1.9k tokensUpdated 24 days ago
    Auto-check passed
  • Bloc

    evanca/flutter-ai-rules

    A skill your agent uses when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit…

    649 GitHub stars~2.8k tokensUpdated 24 days ago
    Auto-check passed

Categories

Questions about Patrol E2E Testing

What does Patrol E2E Testing do?

A skill your agent uses when writing E2E/integration tests, testing native interactions like permissions or system dialogs, capturing UI regressions, or validating cross-platform behavior (Patrol…. Patrol E2E Testing is an agent skill from evanca/flutter-ai-rules.x).

When should I use Patrol E2E Testing?

Patrol E2E Testing fits situations like: writing E2E/integration tests; testing native interactions like permissions; capturing UI regressions; validating cross-platform behavior (Patrol 4.x).

How do I install Patrol E2E Testing in Claude Code?

Run `npx skills add evanca/flutter-ai-rules --skill patrol-e2e-testing -a claude-code`. Or copy the skill folder (skills/patrol-e2e-testing in evanca/flutter-ai-rules) into .claude/skills/patrol-e2e-testing in your project. Claude Code loads it when a task matches its description.

How do I install Patrol E2E Testing in Codex?

Run `npx skills add evanca/flutter-ai-rules --skill patrol-e2e-testing -a codex`. Or copy the skill folder (skills/patrol-e2e-testing in evanca/flutter-ai-rules) into .agents/skills/patrol-e2e-testing in your project. Codex loads it when a task matches its description.

Can I use Patrol E2E Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evanca/flutter-ai-rules --skill patrol-e2e-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/patrol-e2e-testing, .gemini/skills/patrol-e2e-testing, .github/skills/patrol-e2e-testing and .opencode/skills/patrol-e2e-testing in your project.

What does Patrol E2E Testing need to run?

Going by SKILL.md and its folder, Patrol E2E Testing needs credentials named E2E_PASSWORD.

Does Patrol E2E Testing access the network?

SKILL.md names 1 domain. As links in the text: patrol.leancode.co. This is read from the text; nothing was executed.

Is Patrol E2E Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Patrol E2E Testing use?

Patrol E2E Testing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Patrol E2E Testing use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Patrol E2E Testing?

Skills that share tags, products or a category with Patrol E2E Testing: Integration E2E Testing (shinpr/claude-code-workflows, 691 stars), Add Acceptance Test (talkincode/toughradius, 691 stars), Integration E2E Testing (shinpr/ai-coding-project-boilerplate, 232 stars) and Migrate E2E To Integration (openshift/oc-mirror, 124 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Patrol E2E Testing?

evanca (a GitHub user) maintains it in evanca/flutter-ai-rules, which has 649 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 14, 2026.

Source: evanca/flutter-ai-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.