flutter-testing · git:20260331.a8cec9f · 2026-03-31 · sha256 40c1d0a1ce9249e8
flutter-testing git:20260331.a8cec9fA
Immutable. This exact content never changes and is served at /api/v1/blob/40c1d0a1ce9249e8.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_ji5wx2l5v6bglmn2/40c1d0a1ce9249e86b6c3f97a9c5ea99f838aae563c94b6050430035753d1c69.json
Then /plugin install flutter-testing@markdownregistry-ji5wx2l5v6bglmn2 in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
--- name: "flutter-testing" description: "Comprehensive Flutter testing using test package with unit tests, widget tests, and integration tests. Use this skill when writing unit tests for business logic and services, creating widget tests with testWidgets and pumpWidget, implementing integration tests with IntegrationTestWidgetsFlutterBinding, setting up mocking with mocktail or mockito, testing async code and futures, implementing golden file tests for UI regression, measuring code coverage, following AAA pattern (Arrange-Act-Assert), testing state management (Provider/Riverpod/BLoC), handling pump/pumpAndSettle for animations, testing navigation and routing, or debugging test failures. CRITICAL: Use when troubleshooting common test failures including async errors (Expected Future errors, missing pumpAndSettle), golden test pixel differences across platforms (CI/CD font rendering issues, macOS/Linux/Windows antialiasing), MediaQuery/Theme missing errors, flaky tests from unmocked dependencies, Timer memory leaks, or setting up cross-platform golden test reliability with tolerance thresholds. Covers setUp/tearDown, test groups, matchers (expect/findsOneWidget/findsNothing), CI/CD test automation, and production troubleshooting." metadata: last_modified: "2026-03-31 14:30:00 (GMT+8)" --- # Testing Best Practices Guide ## Overview Establish profoundly resilient testing methodologies across every layer encompassing your comprehensive Flutter/Dart applications. High-quality testing guarantees application stability universally, eradicates regressions entirely, and accelerates dynamic iterative deployment production cycles driving aggressive developmental velocity harboring extreme confidence gracefully. ## Process ### 🚀 High-Level Workflow Building an impenetrable testing suite actively involves three critical sequential phases: ### Phase 1: Fundamentals & Code Design Verifications #### 1.1 Comprehend Core Flutter Testing Tiers Intimately comprehend the fundamental pyramidal testing tier distinctions differentiating Unit Testing (pure isolated Dart logic), Widget Testing (visual UI rendering components and specific gesture validations), and foundational structured Native Platform alignments. - [🛠️ Fundamentals & Architecture Testing](./references/testing-fundamentals.md) - Learn to decide which testing tier to employ and enforce Mock-driven MVVM structural isolations strictly. #### 1.2 Master Orthodox AAA Syntactical Tiers Establish standard generic native Flutter test executions authentically applying the `flutter_test` framework capabilities implementing universally rigid orthodox AAA (Arrange, Act, Assert) validation sequence structures unyieldingly efficiently securely. - [🛠️ Core Testing Methodologies](./references/core-testing.md) - Executing semantic groups, setUp, and tearDown procedures flawlessly natively. ### Phase 2: Interacting Extenal Isolations #### 2.1 Implementing External Overriding Environments Isolate independent external dependencies phenomenally effectively. Obliterate brittle flaking network API interactions during local test execution cycles stringently by stubbing identical API responses intercepting orchestrating robust complex mock environments. - [🧪 Advanced Tools Guide](./references/advanced-tools.md) - Vigorously implementing Mockito and Mocktail protocols actively resolving chaotic volatile network data streams gracefully identically reliably. ### Phase 3: Visual & E2E Validation #### 3.1 Pixel-Perfect UI Matching Verifications (Goldens) Execute integrating rigorous exhaustive explicit Golden tests categorically ensuring structural rendering visual UI component displays permanently circumvent unintentionally inducing devastating visual regressions unexpectedly fracturing executing rendering sequences universally standardizing cross-platform visual consistency impeccably securely reliably! - [🧪 Advanced Tools Guide](./references/advanced-tools.md) - Explore explicit layout configuration and infallible rendering comparison capabilities. #### 3.2 Advanced E2E Automation Dynamics Confidently wield immensely sophisticated tooling arrays possessing immense interactive capability engaging manipulating interfacing directly bridging fundamental OS-level systemic permission boundaries authentically generating extraordinarily robust comprehensive empirical QA testing performance capability reports systematically exclusively perfectly uniformly entirely. - [🧪 Advanced Tools Guide](./references/advanced-tools.md) - Aggressively exploiting manipulating Patrol accompanied alongside ConvenientTest frameworks radically dominating aggressive intricate profound multi-layered systematic holistic sequential user integration algorithmic validation test sweeps comprehensively successfully! ### Phase 4: Troubleshooting & Production Issues #### 4.1 Diagnosing Common Test Failures Systematically resolve production-grade testing edge cases encompassing async timing errors, golden test cross-platform pixel inconsistencies, widget dependency crashes, and flaky mock configurations plaguing CI/CD pipelines universally standardizing robust testing practices. - [🔧 Troubleshooting & Edge Cases Guide](./references/troubleshooting.md) - Masterfully diagnosing async errors (`Expected Future` crashes, missing `pumpAndSettle()`), golden test font rendering inconsistencies across macOS/Linux/Windows/CI environments, MediaQuery/Theme missing crashes, Timer memory leaks, tolerance threshold configuration, and external dependency mocking strategies comprehensively authoritatively! --- ## 📚 Documentation Library Systematically load consuming these reference resources sequentially scaling encompassing throughout your holistic systematic testing lifecycle development progression natively efficiently seamlessly: - [🧱 Testing Fundamentals & Architecture Validations](./references/testing-fundamentals.md) - [🛠️ Core Validations Executions Models & AAA Workflows](./references/core-testing.md) - [🧪 Advanced Tools (Mocking, Goldens, End-to-End Orchestrations)](./references/advanced-tools.md) - [🔧 Troubleshooting & Production Edge Cases](./references/troubleshooting.md)