flutter-testing

Implement Flutter unit, bloc, widget, and golden tests with scaffolding helpers.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill flutter-testing-dimitriremoiville
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-testing
Source: https://github.com/dimitriRemoiville/cc-mobile/tree/main/plugins/cc-mobile-flutter/skills/flutter-testing
Command: npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill flutter-testing-dimitriremoiville

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter projects often struggle to maintain robust tests across unit, bloc, widget, and golden tests without established patterns and tooling.

Core Features & Use Cases

  • Unit and Bloc tests: Standards for writing deterministic tests with unit and bloc testing libraries, avoiding deprecated or brittle approaches.
  • Widget and Golden tests: Guidance for widget testing and golden image verification using supported tooling.
  • Test scaffolding: Helpers and conventions (pump_app, fixtures, fake data) to speed up test development and ensure consistency.

Quick Start

Create a new test using the provided helpers and conventions, then run flutter test to verify results.

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, bloc, and widget testing?

Set up Flutter test scaffolding using helpers like pump_app wrappers and data fixtures. Run flutter test after creating tests with these conventions to verify deterministic outcomes across unit, bloc, widget, and golden tests.

How do I write deterministic bloc tests in Flutter?

Write deterministic bloc tests in Flutter by using the bloc_test library alongside mocktail for mocking dependencies. This combination ensures reliable state verification and avoids deprecated or brittle testing approaches.

What's the best way to generate fake data for Flutter widget tests?

Generate fake data for Flutter widget tests by applying test scaffolding conventions and data fixtures. Using helpers like pump_app wrappers alongside mocktail ensures consistent fake data generation and reliable widget rendering outcomes.

Does this Flutter testing approach support golden image verification?

Yes, this Flutter testing approach supports golden image verification using supported tooling. It provides specific guidance for golden tests alongside widget, unit, and bloc testing to ensure comprehensive UI and logic validation.

How do I manage GetIt scope patterns in Flutter tests?

Manage GetIt scope patterns in Flutter tests by applying test scaffolding conventions that ensure proper dependency injection isolation. This approach guarantees deterministic test outcomes by resetting scopes between test runs.

Why are my Flutter widget tests brittle and how can I fix them?

Flutter widget tests become brittle without established patterns. Fix them by using test scaffolding like pump_app wrappers, mocktail for mocking, and data fixtures to ensure deterministic and reliable test execution.