flutter-testing

Installation
Summary

Comprehensive guidance for unit, widget, and integration testing across Flutter applications.

  • Covers three test types with trade-off analysis: unit tests for isolated logic (fast, low maintenance), widget tests for UI components (higher confidence, more dependencies), and integration tests for end-to-end flows (highest confidence, slowest execution)
  • Includes practical examples for all three test categories, from basic Counter tests to complex user flows and performance profiling
  • Provides mocking strategies for plugin interactions, platform channel handling, and external dependencies to keep tests reliable and fast
  • Addresses common testing errors (RenderFlex overflow, unbounded viewport, setState during build) with concrete solutions and prevention patterns
  • Covers test execution across different build modes (debug, profile, release) and platforms (Android, iOS, web) with coverage reporting and debugging techniques
SKILL.md

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.
Related skills
Installs
1.2K
GitHub Stars
95
First Seen
Jan 22, 2026