flutter-testing

Structure unit, widget, and integration tests for Flutter apps.

1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/Melsaeed276/flutter-agent-skills --skill flutter-testing-melsaeed276
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-testing
Source: https://github.com/Melsaeed276/flutter-agent-skills/tree/main/flutter-skill-cloud/testing
Command: npx skills add https://github.com/Melsaeed276/flutter-agent-skills --skill flutter-testing-melsaeed276

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter testing strategy and patterns to ensure reliable unit, widget, and integration tests, effective mocking, golden tests, and CI stability for Flutter apps.

Core Features & Use Cases

  • Unit tests: verify pure functions, state logic, and repositories with fakes.
  • Widget tests: validate rendering and interactions across breakpoints.
  • Integration tests: end-to-end flows across screens and app lifecycles.
  • Mocking & Golden tests: use mocks and golden tests to ensure UI consistency.
  • CI stability: separate fast and slow suites to keep pipelines deterministic.

Quick Start

Run the Flutter test suite to validate changes across unit, widget, and integration tests.

Frequently Asked Questions about flutter-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Flutter tests for unit, widget, and integration suites?

Structure Flutter tests by separating fast unit and widget tests from slower integration tests. This pattern validates pure functions, UI rendering, and end-to-end flows while keeping CI pipelines deterministic and reliable.

When do I need golden tests in a Flutter project?

Golden tests are needed in a Flutter project to ensure UI consistency across rendering changes. They compare widget renders against baseline images to catch unintended visual regressions across different breakpoints.

What is the best way to mock repositories in Flutter testing?

The best way to mock repositories in Flutter testing is by using fakes to isolate state logic and pure functions. This structured mocking approach ensures unit tests remain fast, focused, and deterministic.

Can I run Flutter widget tests across different screen breakpoints?

Yes, you can run Flutter widget tests across different screen breakpoints to validate responsive rendering and interactions. This ensures the UI behaves correctly under various device constraints without manual checks.

Why does my Flutter CI pipeline have flaky integration tests?

Flutter CI pipelines have flaky integration tests when fast and slow suites are mixed without deterministic test setups. Separating these suites and using structured mocking stabilizes end-to-end flows across app lifecycles.

Do I need the Flutter SDK to run widget and integration tests?

Yes, you need the Flutter SDK and Dart testing libraries to run widget and integration tests. These dependencies provide the required framework to execute deterministic test setups and validate UI interactions.