coverage
Coverage data manipulation and formatting
1.15.1
11M downloads/mo
#15 most downloaded on pub.dev
dart-lang/tools
What this package is like to depend on
Last release 2 months ago
09 Jun 2026
Ships unpredictably
gaps range from 1 weeks to 11 months
Most releases are documented
notes for 88 of 101 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
101 releases · first in 2014
1 release in the last 12 months
see the full history below
Release timeline
101 releases · Feb 2014 to Jun 2026Releases
latest 60 of 101-
1.15.109 Jun 2026 -
1.15.009 Jul 2025Release notes
Open source →- Expose
filterIgnoredfunction, which filters the coverage data according to// coverage:ignore-...comments. Previously this filtering functionality was only available when loading coverage data from json usingparseJsonetc.
- Expose
-
1.14.105 Jun 2025Release notes
Open source →- Remove dependency on
package:pubspec_parse. - Silence a rare error that can occur when trying to resume the main isolate because the VM service has already shut down. This was responsible for a ~0.1% flakiness, and is safe to ignore.
- Remove dependency on
-
1.14.025 May 2025Release notes
Open source →- Require Dart ^3.6.0
- Partial support for workspace packages in
test_wth_coverage. - Deprecate
test_wth_coverage's--package-nameflag, because it doesn't make sense for workspaces. - Change the default
--portto 0, allowing the VM to choose a free port.
-
1.13.101 May 2025Release notes
Open source →- Fix a bug where the VM service can be shut down while some coverage collections are still happening.
-
1.13.030 Apr 2025Release notes
Open source →- Introduced support for minimum coverage thresholds using --fail-under flag in format_coverage.
- Fix a bug where we attempt to resume an isolate after the VM service has been shut down.
-
1.12.010 Apr 2025Release notes
Open source →- Introduced support for specifying coverage flags through a YAML file.
- Fix a bug where coverage collection could hang forever if the package under test used background isolates that were never shut down.
-
1.11.105 Dec 2024 -
1.11.010 Nov 2024Release notes
Open source →- Fix a bug where the tool would occasionally try to resume an isolate after the VM service had been disposed.
-
1.10.016 Oct 2024 -
1.9.230 Aug 2024 -
1.9.128 Aug 2024 -
1.9.001 Aug 2024Release notes
Open source →- Require Dart ^3.4
- Fix bug where some ranges were able to bypass the
--scope-outputfilters. - Add --ignore-files option allowing to exclude files from coverage reports using glob patterns
-
1.8.006 May 2024 -
1.7.213 Dec 2023 -
1.7.125 Oct 2023 -
1.7.018 Oct 2023Release notes
Open source →- Require Dart 3.0.0
- Update
package:vm_serviceconstraints to '^12.0.0'. - Add
coverableLineCacheparameter tocollect. This allows the set of coverable lines to be cached between calls tocollect, avoiding the need to force compile the same libraries repeatedly. This is only useful when running multiple coverage collections over the same libraries.
-
1.6.402 Oct 2023Release notes
Open source →- allow omitting space between
//andcoveragein coverage ignore comments - allow text after coverage ignore comments
- throw FormatException when encountering unbalanced ignore comments instead of silently erroring
- Update
package:vm_serviceconstraints to '>= 9.4.0 <12.0.0'.
- allow omitting space between
-
1.6.306 Feb 2023Release notes
Open source →- Require Dart 2.18
- Update
package:vm_serviceconstraints to '>=9.4.0 <12.0.0'.
-
1.6.212 Jan 2023 -
1.6.120 Sep 2022 -
1.6.008 Sep 2022Release notes
Open source →- Update to vm_service 9.4.0.
- Use IsolateRef.isolateGroupId to speed up coverage collection.
- Ignore uncoverable abstract methods.
- Fix bug where 'ingore-line' comments etc are applied even if they're inside string literals.
- Change the LICENSE file to the standard Dart BSD license.
-
1.5.030 Jun 2022Release notes
Open source →-
Support passing extra arguments to
test_with_coveragewhich are then passed topackage:test.Example:
dart run coverage:test_with_coverage -- --preset CI
-
-
1.4.021 Jun 2022Release notes
Open source →- Added
HitMap.parseJsonSyncwhich takes a cache of ignored lines which can speedup calls whencheckIgnoredLinesis true and the function is called several times with overlapping files in the input json. - Bump the version of vm_service to 9.0.0.
- Added
-
1.3.216 May 2022Release notes
Open source →- Fix test_with_coverage listening to an unsupported signal on windows.
- Fix
--reportOnon windows using incorrect path separators.
-
1.3.112 May 2022Release notes
Open source →- Fix running
dart pub global run coverage:test_with_coverageordart run coverage:test_with_coverage
- Fix running
-
1.3.011 May 2022Release notes
Open source →- Bump the minimum Dart SDK version to 2.15.0
- Add a
--packageflag, which takes the package's root directory, instead of the .package file. Deprecate the--packagesflag. - Deprecate the packagesPath parameter and add packagePath instead, in
HitMap.parseJson,HitMap.parseFiles,createHitmap, andparseCoverage. - Add a new executable to the package,
test_with_coverage. This simplifies the most common use case of coverage, running all the tests for a package, and generating an lcov.info file. - Use the
libraryFiltersoption ingetSourceReportto speed up coverage runs that usescopedOutput.
-
1.2.024 Mar 2022Release notes
Open source →- Support branch level coverage information, when running tests in the Dart VM. This is not supported for web tests yet.
- Add flag
--branch-coverage(abbr-b) to collect_coverage that collects branch coverage information. The VM must also be run with the--branch-coverageflag. - Add flag
--pretty-print-branchto format_coverage that works similarly to pretty print, but outputs branch level coverage, rather than line level. - Update
--lcov(abbr-l) in format_coverage to output branch level coverage, in addition to line level. - Add an optional bool flag to
collectthat controls whether branch coverage is collected. - Add a
branchHitsfield toHitMap. - Add support for scraping the service URI from the new Dart VM service message.
- Correctly parse package_config files on Windows when the root URI is relative.
-
1.1.018 Jan 2022Release notes
Open source →- Support function level coverage information, when running tests in the Dart VM. This is not supported for web tests yet.
- Add flag
--function-coverage(abbr-f) to collect_coverage that collects function coverage information. - Add flag
--pretty-print-func(abbr-f) to format_coverage that works similarly to pretty print, but outputs function level coverage, rather than line level. - Update
--lcov(abbr-l) in format_coverage to output function level coverage, in addition to line level. - Add an optional bool flag to
collectthat controls whether function coverage is collected. - Added
HitMap.parseJson,FileHitMaps.merge,HitMap.parseFiles,HitMap.toJson,FileHitMapsFormatter.formatLcov, andFileHitMapsFormatter.prettyPrintthat switch from usingMap<int, int>to represent line coverage to usingHitMap(which contains both line and function coverage). Document the old versions of these functions as deprecated. We will delete the old functions when we update to coverage version 2.0.0. - Ensure
createHitmapreturns a sorted hitmap. This fixes a potential issue with ignore line annotations. - Use the
reportLinesflag invm_service'sgetSourceReportRPC. This typically halves the number of RPCs that the coverage collector needs to run. - Require Dart
>=2.14.0
-
1.0.420 Dec 2021Release notes
Open source →- Updated dependency on
vm_servicepackage from>=6.1.0 <8.0.0to>=8.1.0 <9.0.0.
- Updated dependency on
-
1.0.326 May 2021 -
1.0.219 Mar 2021Release notes
Open source →- Fix an issue where the
--packagesargument wasn't passed toformat_coverage.
- Fix an issue where the
-
1.0.102 Mar 2021 -
1.0.028 Feb 2021 -
0.15.208 Feb 2021Release notes
Open source →- Update
args,logging, andpackage_configdeps to allow the latest stable releases.
- Update
-
0.15.120 Jan 2021Release notes
Open source →- Updated dependency on
vm_servicepackage from>=1.0.0 < 5.0.0to>=1.0.0 <7.0.0.
- Updated dependency on
-
0.15.014 Jan 2021Release notes
Open source →- BREAKING CHANGE: Eliminate the
--package-rootoption frombin/run_and_collect.dartandbin/format_coverage.dartas well as fromrunAndCollectand theResolverconstructor.
- BREAKING CHANGE: Eliminate the
-
0.14.210 Nov 2020Release notes
Open source →- Fix an issue where
--wait-pausedwithcollectwould attempt to collect coverage if no isolates have started.
- Fix an issue where
-
0.14.110 Sep 2020Release notes
Open source →- Updated dependency on
vm_servicepackage from>=1.0.0 < 5.0.0to>=1.0.0 <6.0.0.
- Updated dependency on
-
0.14.004 Jun 2020Release notes
Open source →-
Add flag
--check-ignorethat is used to ignore lines from coverage depending on the comments.Use // coverage:ignore-line to ignore one line. Use // coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive. Use // coverage:ignore-file to ignore the whole file.
-
-
0.13.1104 Jun 2020 -
0.13.1003 Jun 2020Release notes
Open source →-
Add flag
--check-ignorethat is used to ignore lines from coverage depending on the comments.Use // coverage:ignore-line to ignore one line. Use // coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive. Use // coverage:ignore-file to ignore the whole file.
-
-
0.13.909 Mar 2020Release notes
Open source →- Don't crash on empty JSON input files.
- Loosen the dependency on the
vm_servicepackage from>=1.0.0 <4.0.0to>=1.0.0 <5.0.0.
-
0.13.802 Mar 2020Release notes
Open source →- Update to package_config
1.9.0which supports package_config.json files and should be forwards compatible with2.0.0. - Deprecate the
packageRootargument onResolver.
- Update to package_config
-
0.13.728 Feb 2020Release notes
Open source →- Loosen the dependency on the
vm_servicepackage from>=1.0.0 <3.0.0to>=1.0.0 <4.0.0.
- Loosen the dependency on the
-
0.13.610 Feb 2020 -
0.13.501 Feb 2020Release notes
Open source →- Update
parseChromeCoverageto merge coverage information for a given line. - Handle source map parse errors in
parseChromeCoverage. Coverage will not be considered for Dart files that have corresponding invalid source maps.
- Update
-
0.13.424 Jan 2020Release notes
Open source →- Add
parseChromeCoveragefor creating a Dart based coverage report from a Chrome coverage report.
- Add
-
0.13.328 Sep 2019Release notes
Open source →- Adds a new named argument to
collectto filter coverage results by a set of VM isolate IDs. - Migrates implementation of VM service protocol library from
package:vm_service_lib, which is no longer maintained, topackage:vm_service, which is.
- Adds a new named argument to
-
0.13.3+125 Oct 2019Release notes
Open source →- Loosen the dependency on the
vm_servicepackage from^1.0.0to>=1.0.0 <3.0.0. Ensures dependency version range compatibility with the latest versions of packagetest.
- Loosen the dependency on the
-
0.13.3+203 Dec 2019Release notes
Open source →- Tighten the dependency on the
vm_servicepackage from>=1.0.0 <3.0.0down to>=1.0.0 <2.1.2in order to exclude version2.1.2which is broken on the current stable Dart VM due to a missing SDK constraint in its pubspec.yaml. The breakage was introduced in: https://github.com/dart-lang/sdk/commit/9e636b5ab4de850fb19bc262e0686fdf14bfbfc0.
- Tighten the dependency on the
-
0.13.3+304 Dec 2019Release notes
Open source →- Re-loosen the dependency on the
vm_servicepackage from>=1.0.0 < 2.1.2to>=1.0.0 <3.0.0now that breakage introduced in version2.1.2has been resolved. Fixed in: https://github.com/dart-lang/sdk/commit/7a911ce3f1e945f2cbd1967c6109127e3acbab5a.
- Re-loosen the dependency on the
-
0.13.223 Jul 2019Release notes
Open source →- Add new multi-flag option
--scope-outputwhich restricts coverage output so that only scripts that start with the provided path are considered.
- Add new multi-flag option
-
0.13.118 Jul 2019Release notes
Open source →- Handle scenario where the VM returns empty coverage information for a range.
-
0.13.010 Jul 2019Release notes
Open source →- BREAKING CHANGE: Skips collecting coverage for
dart:libraries by default, which provides a significant performance boost. To restore the previous behaviour and collect coverage for these libraries, use the--include-dartflag. - Disables WebSocket compression for coverage collection. Since almost all coverage collection runs happen over the loopback interface to localhost, this improves performance and reduces CPU usage.
- Migrates implementation of VM service protocol library from
package:vm_service_client, which is no longer maintained, topackage:vm_service_lib, which is.
- BREAKING CHANGE: Skips collecting coverage for
-
0.12.411 Jan 2019Release notes
Open source →collect()now immediately throwsArgumentErrorif a null URI is passed in theserviceUriparameter to avoid a less-easily debuggable null dereference later. See dart-lang/coverage#240 for details.
-
0.12.319 Oct 2018Release notes
Open source →- Fixed dart-lang/coverage#194. During collection, we now track each script by its (unique) VMScriptRef. This ensures we look up the correct script when computing the affected line for each hit token. The hitmap remains URI based, since in the end, we want a single, unified set of line to hitCount mappings per script.
-
0.12.225 Jul 2018 -
0.12.126 Jun 2018 -
0.12.026 Jun 2018Release notes
Open source →- BREAKING CHANGE: This version requires Dart SDK 2.0.0-dev.64.1 or later.
- Strong mode fixes as of Dart SDK 2.0.0-dev.64.1.