/senior-dev-flutter:flutter-test-strategyfrom senior-dev-flutter
Guides test placement decisions across unit, widget, golden, and integration layers in Flutter/Dart codebases. Authors concise IEEE/ISTQB test-matrix.md files and enforces per-package coverage gates.
Ships in senior-dev-flutter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Flutter Test Strategy defines lowest-layer test placement (Unit, Widget, Golden, Integration), per-package coverage ratchets, concise IEEE/ISTQB docs/<feature-name>/test-matrix.md (<= 80 lines), and Fail-Honest execution proof across Claude Code and Google Antigravity—complementing dart-add-unit-test, flutter-add-widget-test, flutter-add-widget-preview, flutter-add-integration-test, dart-generate-test-mocks, and dart-collect-coverage.
Unit, Widget, Golden, and Integration tests for a Flutter feature or bugfix.docs/<feature-name>/test-matrix.md (<= 80 lines) or calibrating per-package LCOV gates.dart-generate-test-mocks or flutter-add-widget-test once the layer is chosen.test-driven-development or testing-expert.flowchart LR
A["Change / US-AC"] --> B["Lowest Layer: Unit | Widget | Golden | Integration"]
B --> C["Scoped TDD Loop (Assigned Test Only)"]
C --> D["Full Suite + LCOV Ratchet"]
D --> E["test-matrix.md (<=80 lines) + Exit 0 / BLOCKED"]
Inspect root AGENTS.md (<= 90 lines wired to context/memory/MEMORY.md), official Google root DESIGN.md (<= 110 lines 2-layer YAML + 8 sections), and optional ## Design in docs/<feature-name>/spec.md (<= 30 lines screen delta). Test at the lowest layer that catches the defect (see references/test-pyramid-flutter.md):
package:test): Domain rules, DTO mappers, Notifier/Bloc transitions with fake repos.WidgetTester): Loading/empty/error/data branching, user gestures, 48x48dp & Semantics.DESIGN.md tokens (flutter-add-widget-preview).integration_test/): Critical multi-screen flows (auth, checkout) on simulator/device/Chrome.*.g.dart, *.freezed.dart, *.gr.dart) or trivial getters.test-matrix.md (<= 80 lines) & Fail-Honest ProofTier 1 (Fast-Track): Run only the scoped test file (flutter test <assigned_test>.dart); skip test-matrix.md.
Tier 2 & Tier 3: Author docs/<feature-name>/test-matrix.md (<= 80 lines) with 1. Execution Summary and 2. Test Case Matrix using per-case columns: TC-01... -> ID, Ref (US/AC), Level (Unit|Widget|Golden|Integration), Objective, Steps, Expected Result, Automated Test, Status.
Later requests: each request is a change C-NN. Extend, never replace the matrix (add C-NN rows, keep earlier PASS (C-01 @ <sha>) rows), run only the affected flutter test <files>, and run the Full suite at most once per change, skipping it when nothing changed since Last full run.
Real backend on mobile: a mobile-only app still runs: flutter test integration_test/ -d <emulator|simulator|macos> against the real backend (or the Firebase emulator), no mocked repositories or providers, with screenshots from IntegrationTestWidgetsFlutterBinding.takeScreenshot. With no device it is BLOCKED, not done.
Completion Proof: close each change with requirements covered, test exit codes, a build (flutter build web, or flutter build apk --debug without a web target), dart analyze on the changed files, the evidence screenshots and a DONE/NOT DONE verdict (see the qa-tester skill).
Flutter Web real-app proof: Widget tests with mocks do not prove a screen works. With a web/ target, e2e-blackbox-tester runs the release build against the real backend using Playwright. See flutter-web-playwright.md in the blackbox-tester skill.
Strict Fail-Honest Verification (BLOCKED / SKIPPED): If flutter test or integration_test/ (simulator/emulator/Chrome web) cannot execute (missing Flutter SDK, no simulator booted), you MUST report BLOCKED: Not executed — <exact command & terminal error> (or SKIPPED when N/A)—strictly forbidden from claiming PASSED without exit code 0 terminal output.
Keep the exit code: run tests as log=$(mktemp); flutter test --reporter failures-only <file> >"$log" 2>&1; code=$?; tail -n 40 "$log"; echo "exit=$code log=$log". A test command piped straight into tail, head or grep returns the filter's exit code, so a failing run looks green. Search $log for details instead of running the same command again.
# Scoped TDD loop vs full coverage ratchet excluding generated code
flutter test test/features/cart/cart_notifier_test.dart
flutter test --coverage
lcov --remove coverage/lcov.info '*.g.dart' '*.freezed.dart' '*.gr.dart' -o coverage/filtered.info
PASSED for flutter test or integration_test/ without exit code 0 terminal output instead of reporting BLOCKED / SKIPPED.80 lines or omitting Objective, Steps, or Expected Result in docs/<feature-name>/test-matrix.md.*.g.dart/*.freezed.dart files, running full test suites inside parallel TDD loops, or skipping regression tests on bugfixes.DESIGN.md visual tokens by golden tests where applicable.*.g.dart, *.freezed.dart, *.gr.dart) excluded from per-package LCOV ratchets.docs/<feature-name>/test-matrix.md stays <= 80 lines with full IEEE/ISTQB TC-01... columns.exit code 0 terminal output or explicitly marked BLOCKED: Not executed — <exact command & terminal error> / SKIPPED.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/context-captureUse when finishing a task at State 5 (Ship & Finish) or when the user explicitly asks to "save context", "guarda contexto", "record decisions", or "hand off" — writes ultra-compact persistent memory to context/memory/ and ensures target-project root AGENTS.md (<= 90 lines) stays wired to DESIGN.md and MEMORY.md across Claude Code and Google Antigravity./context-restoreUse at session start (State 0) or when asked to "load context", "catch up", or "what was done before" — prioritizes LLM Wiki Progressive Disclosure (context/memory/MEMORY.md) across Claude Code and Google Antigravity while supporting user-confirmed restore for scripted sessions (context/sessions/)./npx claudepluginhub jggomez/expert-ai-developer-skills --plugin senior-dev-flutterOther plugins' skills for the same job