Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Flutter Coverage TrackerNew to Visual Studio Code? Get it now.
Flutter Coverage Tracker

Flutter Coverage Tracker

Muhammad Kamel

|
1 install
| (0) | Free
Tracks and displays Flutter test coverage in the status bar.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Flutter Coverage Tracker

VSCode Marketplace Version

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

  1. Open VS Code
  2. Press Ctrl+P / Cmd+P
  3. Type ext install muhammadkamel.flutter-coverage-tracker
  4. Press Enter

Usage

Single File Testing

  1. Open any Dart file in your Flutter project
  2. Right-click in the editor
  3. Select "Run Related Test"
  4. View coverage results in the interactive dashboard

Folder Testing

  1. Right-click on any folder in the Explorer
  2. Select "Run Folder Tests"
  3. View aggregated results with folder hierarchy
  4. Expand folders to see individual test files
  5. Click on line numbers to navigate to uncovered code

Export Coverage Report

  1. After running folder tests, click the "Export MD" button in the dashboard
  2. 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

  1. Test Execution: Runs flutter test --coverage for your selected file or folder
  2. Coverage Parsing: Parses the generated lcov.info file
  3. Smart Matching: Matches source files to coverage data using intelligent path resolution
  4. Visualization: Displays results in a beautiful, interactive webview dashboard
  5. 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

  • GitHub Repository
  • VS Code Marketplace
  • Report Issues

📊 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

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft