Flutter Coverage Tracker

A powerful VS Code extension that tracks and visualizes Flutter test coverage with an intuitive interface, making it easy to identify untested code and maintain high-quality Flutter applications.
✨ Features
- 📊 Real-time Coverage Tracking - Monitor coverage percentage in your status bar
- 🎯 Quick Test Execution - Run related tests directly from any Dart file with right-click context menu
- 📁 Folder Test Runner - Run tests for entire folders and view aggregated results
- 🌳 Hierarchical Dashboard - Organize test results in an expandable folder tree structure
- 🔍 Uncovered Lines Navigation - Click on line numbers to jump directly to untested code
- 📝 Export Coverage Reports - Generate Markdown reports of uncovered lines for team sharing
- 🔄 Auto-create Missing Tests - Automatically generate test file stubs for files without tests
- ⚡ Watch Mode - Automatically re-run tests when files change
- 🎨 Beautiful UI - Premium dashboard with gradient badges, progress indicators, and smooth animations
🚀 Getting Started
Installation
- Open VS Code
- Press
Ctrl+P / Cmd+P
- Type
ext install muhammadkamel.flutter-coverage-tracker
- Press Enter
Usage
Single File Testing
- Open any Dart file in your Flutter project
- Right-click in the editor
- Select "Run Related Test"
- View coverage results in the interactive dashboard
Folder Testing
- Right-click on any folder in the Explorer
- Select "Run Folder Tests"
- View aggregated results with folder hierarchy
- Expand folders to see individual test files
- Click on line numbers to navigate to uncovered code
Export Coverage Report
- After running folder tests, click the "Export MD" button in the dashboard
- A Markdown report will be generated with:
- File names and coverage percentages
- Specific uncovered line numbers
- Easy sharing with your team
📸 Screenshots
Status Bar Integration
The coverage percentage is always visible in your status bar, updating in real-time as you run tests.
Interactive Dashboard
- Coverage Visualization: Circular progress indicators with gradient styling
- Uncovered Lines: Expandable sections showing exactly which lines need testing
- Navigation: Click any line number to jump directly to the code
- Test Controls: Re-run, watch mode, and cancel buttons
Folder View
- Hierarchical Tree: Files organized by folder structure
- Status Indicators: Green dots for passing tests, red for failures
- Aggregated Stats: See folder-level coverage at a glance
⚙️ Configuration
Configure the extension through VS Code settings:
{
"flutterCoverage.coverageFilePath": "coverage/lcov.info"
}
Settings
| Setting |
Default |
Description |
flutterCoverage.coverageFilePath |
coverage/lcov.info |
Path to the lcov.info file relative to workspace root |
🎯 Commands
Access these commands via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Flutter Coverage: Run Related Test - Run test for the currently open file
- Flutter Coverage: Run Folder Tests - Run all tests in the selected folder
- Flutter Coverage: Show Coverage Details - Open the coverage dashboard
🏗️ How It Works
- Test Execution: Runs
flutter test --coverage for your selected file or folder
- Coverage Parsing: Parses the generated
lcov.info file
- Smart Matching: Matches source files to coverage data using intelligent path resolution
- Visualization: Displays results in a beautiful, interactive webview dashboard
- Navigation: Provides clickable links to navigate to uncovered code
🤝 Contributing
Contributions are welcome! Please feel free to submit issues or pull requests on GitHub.
📝 License
This extension is licensed under the MIT License. See the LICENSE file for details.
🔗 Links
📊 Statistics
- 100% Logic Coverage on all core modules
- 92+ Unit Tests with comprehensive edge case handling
- Dual-layer Testing architecture (unit + integration tests)
- 83% Overall Coverage (statements, branches, functions)
🎉 Changelog
See CHANGELOG.md for a detailed history of changes and new features.
Made with ❤️ for the Flutter community