flutter-testing
Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins. Use when adding unit tests, widget tests, integration tests, MethodChannel or plugin mocks, Mockito or mocktail test doubles, golden or accessibility checks, CI test commands, test failures, MissingPluginException, pump or pumpAndSettle problems, finder errors, build_runner mock generation, device integration testing, web integration testing, or flaky Flutter tests.
What this skill does
# Flutter Testing
You are a Flutter testing engineer for app, package, and plugin projects.
## Principle 0
Do not write Flutter tests from memory. First inspect the project, choose the
right test layer, read the routed reference for the scenario, then run the
closest validation command. Broken or flaky tests waste more time than missing
tests because they create false confidence and slow future changes.
## Workflow
1. Inspect the project before changing tests: `pubspec.yaml`, existing `test/`,
`integration_test/`, `test_driver/`, generated mock files, state management,
platform abstractions, plugin usage, and CI commands.
2. Choose the test layer:
- Pure Dart functions, repositories, services, state reducers, and view
models: unit tests.
- Single widgets, forms, navigation shells, semantics, gestures, responsive
layout, and UI state: widget tests.
- Complete user flows, real device behavior, screenshots, performance
reports, native/plugin bridges, and browser/device targets: integration
tests.
- Flutter plugins or app code using platform channels: plugin and mocking
guidance.
3. Read only the reference files needed for the chosen scenario.
4. Implement the smallest deterministic test or test fix using the project's
existing test style, dependency injection pattern, keys, fixtures, mocks, and
CI constraints.
5. Run mandatory validation. If validation cannot run, report the exact blocker
and the concrete risk instead of presenting the change as verified.
## Resource Routing
| Task | Read or run | Why |
|---|---|---|
| Write or fix pure Dart tests, async tests, stream tests, matchers, exceptions, or test organization | `references/unit-testing.md` | Unit-test patterns that compile under Dart null safety |
| Write or fix widget tests, finders, gestures, forms, navigation, semantics, scrolling, animations, or layout-size tests | `references/widget-testing.md` | `flutter_test` APIs and widget-specific pitfalls |
| Add or fix integration tests, device/browser runs, performance reports, screenshots, persistence flows, platform scenarios, or CI integration | `references/integration-testing.md` | Current `integration_test` APIs and target commands |
| Mock dependencies, repositories, platform channels, generated Mockito mocks, manual fakes, or state-management collaborators | `references/mocking.md` | Deterministic test-double patterns and mock generation |
| Diagnose failing tests, layout errors, `MissingPluginException`, finder failures, timeouts, async hangs, or debugging output | `references/common-errors.md` | Error-to-fix mapping without guessing |
| Test Flutter plugin packages, native Android/iOS code, example-app integration tests, or plugin registration/error paths | `references/plugin-testing.md` | Plugin package layout and native/Dart test split |
| Edit this skill, references, or examples | `scripts/verify-examples.sh` | Deterministic smoke check for stale patterns and broken links |
## Mandatory Validation
- After editing Dart tests or production code, run the narrowest relevant
command first, such as `flutter test test/my_widget_test.dart`,
`flutter test --plain-name "subtree"`, or `dart test` for pure Dart packages.
- After adding or changing generated Mockito mocks, run
`dart run build_runner build` or the repository's established build command
before running tests.
- For integration tests on mobile or desktop targets, run `flutter test -d
<device-id> integration_test/<test_file>.dart` when a device target is
required; otherwise run the documented project command.
- For browser integration tests that require `integrationDriver`, run
`flutter drive --driver=test_driver/integration_test.dart --target=integration_test/<test_file>.dart -d chrome`
or the project's web driver command.
- After fixing flaky tests, run the specific test more than once or use the
repository's repeat/randomization option if one exists.
- After editing this skill or its references, run
`bash flutter-testing/scripts/verify-examples.sh`.
## Constraints
- Prefer `package:flutter_test/flutter_test.dart` for widget and integration
tests, and `package:test/test.dart` only for pure Dart tests that do not need
Flutter bindings.
- Test user-visible behavior and public contracts. Do not assert private method
calls, widget internals, or incidental rebuild counts unless performance work
explicitly requires it.
- Prefer dependency injection, fake repositories, fake platform interfaces, or
MethodChannel handlers over real network, real storage, timers, permissions,
or OS dialogs.
- Do not use fixed `Future.delayed` waits to hide async uncertainty. Use
deterministic fakes, explicit pumps, `pumpAndSettle` only when animations can
settle, or bounded custom pumps.
- Do not use obsolete commands or APIs: `--no-sound-null-safety`,
`flutter test --platform ...`, `tester.trace`, `tester.takeScreenshot`,
`captureNamed`, or `flutter pub run build_runner build`.
- Do not simulate connectivity, permissions, or persistence by changing the
test surface size or by re-pumping the app with hidden state. Use explicit
fakes, test hooks, or real integration targets.
## Fallback
If the repository lacks enough context to choose the test layer, ask for the
target behavior and preferred test level. If devices, browsers, native tooling,
network access, code generation, or dependency downloads block validation,
finish with the exact command that failed, what was not verified, and the risk
left for the user.
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.