flutter_testmap 0.2.2
flutter_testmap: ^0.2.2 copied to clipboard
Smart, conservative test impact analysis and targeted test runner for Flutter and Dart projects.
flutter_testmap (v0.2.2) #
Smart, Conservative Test Impact Analysis & Selection for Dart & Flutter Projects.
lutter_testmap intelligently determines which Flutter/Dart tests are affected by code changes using resolved AST symbol call graphs and directed dependency traversal.
Why lutter_testmap? #
In large Flutter projects, running the full test suite after every code edit slows down developer velocity and CI pipelines.
Comparison #
| Workflow | Action | Test Execution | Time Elapsed |
|---|---|---|---|
| Standard lutter test | Modify PaymentRepository.getPayment() | Runs all 500 tests | ~3 minutes |
| With lutter_testmap | Modify PaymentRepository.getPayment() | Identifies & runs 7 affected tests | ~5 seconds |
5-Minute Quick Start #
1. Global Activation #
ash dart pub global activate flutter_testmap
2. Find Affected Tests #
Run inside any Flutter/Dart git project: `ash
Targeted symbol-level impact analysis #
flutter_testmap affected --symbol-level
Explain exact symbol call paths #
flutter_testmap affected --symbol-level --explain
Machine-readable JSON output for CI/CD #
flutter_testmap affected --symbol-level --json `
3. Run Affected Tests #
ash flutter_testmap run --symbol-level
Example & Documentation #
See the example/ directory for a complete usage guide and programmatic sample.
Fail-Safe Hierarchy & Safety Principles #
Core Principle: "When TestMap cannot prove a test is unaffected, it does not skip that test."
[Code Change Detected] ? ??? Project Config / Native Change? ?????????? FULL TEST SUITE FALLBACK ??? Syntax Parsing Error? ????????????????????? FULL TEST SUITE FALLBACK ??? Dynamic DI / Reflection / Uncertain? ?????? FILE-LEVEL SAFETY FALLBACK ??? Resolved Symbol Call Graph ??????????????? SYMBOL-LEVEL PRECISION
Limitations & Fallback Behaviors #
- Service Locators (GetIt) & Dynamic Calls: Runtime dynamic lookups that cannot be statically resolved at AST parse time trigger safe file-level fallback.
- Reflection / Mirror Code: Static code analysis falls back safely to prevent false negatives.
- Generated Code (.freezed.dart, .g.dart): Generated files are excluded from primary scanning while keeping source models fully tracked.
CLI Options #
| Command | Option | Description |
|---|---|---|
| ffected | --symbol-level | Uses resolved AST symbol call graph for precise impact analysis |
| ffected | --explain | Prints readable call path breakdown from test down to changed symbol |
| ffected | --json | Outputs machine-readable JSON structure |
| ffected | --conservative | Conservative mode (falls back on any change uncertainty) |
| un | --symbol-level | Runs only tests identified by the symbol impact engine |
| un | --all | Forces 100% test suite execution |
Documentation Links #
- Adversarial Technical Audit & Validation Report v0.2.1
- Symbol-Level Analysis Engine
- Safety Model & Fail-Safe Architecture
- Technical Audit v0.1
- Architecture & Design System
- Roadmap & Release Strategy
License #
MIT License ? Copyright (c) 2026 Flutter TestMap Authors.