flutter-test

majiayu000's avatarfrom majiayu000

Run Flutter tests and analyze results. Use when implementing game logic, fixing bugs, or validating changes. Triggers on "run tests", "test this", "verify", "check if it works".

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

When & Why to Use This Skill

The Flutter Test Runner skill automates the execution and analysis of Flutter test suites to ensure code reliability and performance. It streamlines the development workflow by allowing developers to trigger unit and widget tests through natural language, providing detailed failure analysis, root cause identification, and comprehensive code coverage reporting for Flutter applications.

Use Cases

  • Regression Testing: Automatically run all project tests after code refactoring or feature updates to ensure no existing functionality is broken.
  • Targeted Debugging: Execute specific test files or individual tests matching a pattern (e.g., 'combat logic') to quickly isolate and fix bugs in complex modules.
  • Code Coverage Analysis: Generate detailed coverage reports to identify untested code paths and improve the overall quality and maintainability of the codebase.
  • Validation of Changes: Use simple commands like 'verify' or 'check if it works' to instantly validate recent changes against the defined test suite before merging code.
nameflutter-test
descriptionRun Flutter tests and analyze results. Use when implementing game logic, fixing bugs, or validating changes. Triggers on "run tests", "test this", "verify", "check if it works".
allowed-toolsBash, Read, Grep, Glob

Flutter Test Runner

Instructions

  1. Identify which tests to run:

    • If a specific file was modified, run tests for that file/module
    • If unsure, run all tests with flutter test
    • For a single test file: flutter test test/path/to/test_file.dart
  2. Run the tests:

    flutter test --reporter=expanded
    
  3. Analyze failures:

    • Read the error messages carefully
    • Identify the root cause (logic error, missing mock, incorrect expectation)
    • Suggest specific fixes
  4. For coverage analysis:

    flutter test --coverage
    

Examples

Run all tests:

flutter test

Run specific test file:

flutter test test/models/unit_test.dart

Run tests matching a pattern:

flutter test --name "combat"