flutter-test

Run Flutter tests and analyze failures with coverage reports.

1|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/chaoming/ww2-flutter-game --skill flutter-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-test
Source: https://github.com/chaoming/ww2-flutter-game/tree/main/.claude/skills/flutter-test
Command: npx skills add https://github.com/chaoming/ww2-flutter-game --skill flutter-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps ensure code stability by running Flutter tests and analyzing results, saving debugging time during development.

Core Features & Use Cases

  • Test Execution: Run all tests or targeted test files to validate game logic.
  • Failure Analysis: Extract error messages and trace root causes to fix issues faster.
  • Coverage: Generate test coverage reports to identify gaps.

Quick Start

Run all tests with flutter test, or run a specific test file like flutter test test/models/unit_test.dart. Then review failures and plan fixes.

Frequently Asked Questions about flutter-test

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

FAQPage Schema
How do I run Flutter tests and check if they pass?

Run Flutter tests using `flutter test` to execute all tests in your project, or target specific files with `flutter test test/models/unit_test.dart`. The command validates your code and reports pass/fail status with detailed error messages for failures.

How do I analyze test failures and identify what went wrong?

Test failure analysis extracts error messages and traces root causes from test output. Review the expanded error details to pinpoint which assertion failed, then propose fixes based on the stack trace and expected vs. actual values.

Can I generate test coverage reports for my Flutter project?

Yes, run `flutter test --coverage` to generate test coverage reports that identify which lines of code are exercised by your tests. Coverage reports highlight gaps in your test suite and guide you toward areas needing additional test cases.

What's the best way to run tests for only modified files in Flutter?

Flutter test execution supports targeted test runs by file or pattern. Run specific test files directly with `flutter test path/to/test.dart` or use pattern matching to execute tests for modified components, reducing feedback time during iterative development.

Does Flutter testing work with Dart projects?

Yes, Flutter testing is applicable to Flutter and Dart projects. The `flutter test` command with `--reporter=expanded` works across Dart codebases, whether they're mobile apps, packages, or backend services using the Dart language.

Why should I use expanded test reporting instead of default output?

The `--reporter=expanded` flag provides detailed, line-by-line test output that makes failures easier to diagnose. Expanded reporting shows full context for each assertion, reducing debugging time compared to compact summary formats.