CoverageChecker 0.6.4
See the version list below for details.
dotnet add package CoverageChecker --version 0.6.4
NuGet\Install-Package CoverageChecker -Version 0.6.4
<PackageReference Include="CoverageChecker" Version="0.6.4" />
<PackageVersion Include="CoverageChecker" Version="0.6.4" />
<PackageReference Include="CoverageChecker" />
paket add CoverageChecker --version 0.6.4
#r "nuget: CoverageChecker, 0.6.4"
#:package CoverageChecker@0.6.4
#addin nuget:?package=CoverageChecker&version=0.6.4
#tool nuget:?package=CoverageChecker&version=0.6.4
Coverage Checker Library
The Coverage Checker library is a .NET library for extracting code coverage metrics from various code coverage formats. It is intended to be used as a development dependency if you need to extract code coverage metrics as part of a .NET project.
For general information about the Coverage Checker project, see the repository's main README file.
Installation
To use the Coverage Checker library in your .NET project, add the CoverageChecker NuGet package to your project:
dotnet add package CoverageChecker
Usage
The CoverageAnalyser class is the entry point for extracting code coverage metrics from a coverage file.
The following example shows how to use the CoverageAnalyser class to extract code coverage metrics from a Cobertura
coverage file:
using CoverageChecker;
CoverageAnalyser coverageAnalyser = new(CoverageFormat.Cobertura, ".", "**/coverage.cobertura.xml");
Coverage coverage = coverageAnalyser.AnalyseCoverage();
Options
The CoverageAnalyser class has the following options:
coverageFormat: The format of the coverage file. Options: SonarQube, Coberturadirectory: The directory to search for the coverage file(s) within.
and either one of the following:
globPattern: The glob pattern to use to match the coverage file(s).globPatterns: The glob patterns to use to match the coverage file(s).matcher: The glob pattern matcher to use to match the coverage file(s).
Results
The CoverageAnalyser class returns a Coverage object, which contains all the code coverage metrics. The Coverage
object can contain multiple FileCoverage objects, which can each contain multiple LineCoverage objects.
Coverage Object
Filesproperty: A collection ofFileCoverageobjects.CalculateOverallCoverage(coverageType)method: Calculates the overall code coverage of the specified type for all files.CalculatePackageCoverage(packageName, coverageType)method: Calculates the code coverage of the specified type for all files that are part of the specified package.
FileCoverage Object
Linesproperty: A collection ofLineCoverageobjects.CalculateFileCoverage(coverageType)method: Calculates the code coverage of the specified type for the file.CalculateClassCoverage(className, coverageType)method: Calculates the code coverage of the specified type for all lines that are part of the specified class.CalculateMethodCoverage(methodName, coverageType)method: Calculates the code coverage of the specified type for all lines that are part of the specified method.
LineCoverage Object
Lineproperty: The line number.IsCoveredproperty: Whether the line is covered.Branchesproperty: The number of branches in the line.CoveredBranchesproperty: The number of covered branches in the line.ClassNameproperty: The name of the class the line is part of.MethodNameproperty: The name of the method the line is part of.MethodSignatureproperty: The method signature of the method the line is part of.CalculateLineCoverage(coverageType)method: Calculates the code coverage of the specified type for the line.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
-
net9.0
- Microsoft.Extensions.FileSystemGlobbing (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.0 | 124 | 2/15/2026 |
| 0.8.0 | 118 | 1/11/2026 |
| 0.7.0 | 186 | 10/4/2025 |
| 0.6.6 | 171 | 9/28/2025 |
| 0.6.5 | 171 | 11/24/2024 |
| 0.6.4 | 168 | 11/13/2024 |
| 0.6.3 | 172 | 11/10/2024 |
| 0.6.2 | 163 | 11/10/2024 |
| 0.6.1 | 168 | 10/25/2024 |
| 0.6.0 | 180 | 10/20/2024 |
| 0.5.1 | 164 | 9/29/2024 |
| 0.5.0 | 168 | 9/29/2024 |
| 0.4.0 | 187 | 9/7/2024 |
| 0.3.1 | 388 | 7/12/2024 |
| 0.3.0 | 186 | 7/7/2024 |
| 0.2.2 | 172 | 6/14/2024 |
| 0.2.1 | 185 | 6/13/2024 |
| 0.2.0 | 170 | 6/9/2024 |
| 0.1.0 | 178 | 6/8/2024 |