Dartboard
Flutter and Dart testing in one panel.
See what your tests really cover, why they fail, and what to test next.
Features
|
|
| Coverage |
Line and branch coverage per file, with untested files shown at 0% so the total is honest. |
| Widgets |
Every screen and widget tree, with each child marked rendered or never rendered. |
| States |
Bloc, Cubit, Riverpod and ChangeNotifier events and states your tests reached or missed. |
| Failures |
Each failure as a title, the line to fix, expected vs. actual, and a hint. |
| In the editor |
Gutter marks, coverage above each function, untested cases with one-click test stubs. |
| Widget tests |
Run on 5 screen sizes, check accessibility, and scrub a filmstrip of every frame. |
| Reports |
A PDF audit report, coverage history, and a README badge for your project. |
Everything runs on your machine. No account, no server, no internet needed.
Quick start
- Open a Flutter or Dart project in VS Code.
- Click the Dartboard icon in the activity bar.
- Press ▶ to run your tests and see the results.
Use ⚡ to run only the tests affected by your changes, and … for everything else.
Settings
| Setting |
Default |
Description |
dartboard.testCommand |
flutter test --coverage |
Command for the full run (▶ in the panel title). |
dartboard.flutterCommand |
flutter |
Executable for background runs (single file, live, strength, mapping). |
dartboard.lcovGlob |
**/coverage/lcov.info |
Where to find reports. Several are merged. |
dartboard.exclude |
generated files |
Globs left out everywhere. |
dartboard.goal |
80 |
Coverage goal (0 hides it). |
dartboard.showUntestedFiles |
true |
List files no test imports at 0%. |
dartboard.includeUntestedInTotal |
true |
Count them in totals (estimated line counts). |
dartboard.viewMode |
tree |
tree, flat or layers. |
dartboard.sortBy |
coverageAsc |
coverageAsc, coverageDesc or name. |
dartboard.changedFilesOnly |
false |
Only files changed on this git branch. |
dartboard.liveCoverage |
false |
Re-run a file's tests on save. |
dartboard.maxMutations |
15 |
Changes tried per file by Check Test Strength. |
dartboard.lowThreshold / highThreshold |
50 / 80 |
Red / amber / green cut-offs. |
dartboard.highlightMode |
both |
gutter, line or both. |
dartboard.branchCoverage |
true |
Collect branch coverage (--branch-coverage). |
dartboard.codeLens |
all |
all, uncovered or off for the hints above code. |
dartboard.testPitfalls |
true |
Warn about common widget test mistakes. |
dartboard.screenMatrix |
5 setups |
Screen sizes and themes for Screen sizes. |
dartboard.includeIntegrationCoverage |
true |
Merge integration test coverage into the totals. |
Notes
- Git is optional. Without it, the "changed files" filter is hidden and the risk radar uses coverage and complexity only.
- Test files are matched by name:
lib/src/auth/login.dart ↔ test/auth/login_test.dart.
- Check Test Strength edits the file temporarily and always restores it, even after a crash (on next start).
- Untested files' line counts are estimates from a lightweight Dart parser.
- Widget trees, screens and states are read from your source without running the analyzer. Widgets inside a
const subtree or a conditional that coverage can't see into are marked unknown rather than guessed.
- Screen sizes and Filmstrip write a temporary test file next to yours and delete it afterwards.
Development
npm install
npm test # compile and run all checks
npm run package # build the .vsix
Press F5 in VS Code to try it in a development window.
License
MIT © Sanket Santosh Vidya Manohar
| |