flutter_testmap (v0.2.1 Public Beta)
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
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
- 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.
Libraries
- analyzer/dart_file_analyzer
- analyzer/dependency_graph_builder
- analyzer/import_analyzer
- analyzer/project_analyzer
- analyzer/symbol_analyzer
- analyzer/symbol_ast_visitor
- analyzer/test_analyzer
- cache/analysis_cache
- cli/cli_output
- cli/cli_runner
- git/git_change_detector
- impact/affected_test_finder
- impact/impact_analyzer
- impact/symbol_impact_analyzer
- models/dependency
- models/impact_result
- models/project_graph
- models/source_file
- models/symbol_graph
- models/symbol_node
- models/test_file
- runner/test_runner