flutter-test
Run Flutter/Dart tests, report failures, and incrementally fix test issues. Covers unit, widget, golden, and integration tests.
- Kind
- Prompt
- Works with
- Claude Code, Codex
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- commands/flutter-test.md
- License
- MIT
- Jobs
- Testing, Debugging
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Flutter Test This command runs the Flutter test suite and reports results. When failures occur, it diagnoses and fixes issues incrementally. ## What This Command Does 1. **Run Tests**: Execute `flutter test` (or scope to changed files) 2. **Parse Failures**: Identify failing tests by type and cause 3. **Fix Incrementally**: One failure at a time where possible 4. **Verify**: Re-run after each fix 5. **Report**: Show coverage summary and remaining failures ## When to Use Use `/flutter-test` when: - After implementing a feature to verify nothing broke - After running `/flutter-build` to ensure tests pass - To check test coverage on new code - When a specific test file is failing - Before submitting a PR ## Commands Run ```bash # Run all tests flutter test 2>&1 # Run with coverage flutter test --coverage 2>&1 # Run specific test file flutter test test/unit/domain/usecases/get_user_test.dart 2>&1 # Run tests matching a name pattern flutter test --name "CartBloc" 2>&1 # Run integration tests (requires device/emulator) flutter test integration_test/ 2>&1 # Update golden files when intentional visual changes are made flutter test --update-goldens 2>&1 ``` …