coverlet.msbuild 1.0.0

Coverlet is a cross platform code coverage library for .NET Core, with support for line and method coverage.

There is a newer version of this package available.
See the version list below for details.
Install-Package coverlet.msbuild -Version 1.0.0
dotnet add package coverlet.msbuild --version 1.0.0
<PackageReference Include="coverlet.msbuild" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add coverlet.msbuild --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Build Status
Build status
Coverage Status
License: MIT

coverlet

Coverlet is a cross platform code coverage library for .NET Core, with support for line and method coverage.

Installation

Available on NuGet

Visual Studio:

PM> Install-Package coverlet.msbuild

.NET Core CLI:

dotnet add package coverlet.msbuild

How It Works

Coverlet integrates with the MSBuild system and that allows it to go through the following process:

Before Tests Run

  • Locate the unit test assembly and selects all the referenced assemblies that have PDBs.
  • Instruments the selected assemblies by inserting code to record sequence point hits to a temporary file.

After Tests Run

  • Restore the original non-instrumented assembly files.
  • Read the recorded hits information from the temporary file.
  • Generate the coverage result from the hits information and write it to a file.

Usage

Coverlet deosn't require any additional setup other than including the NuGet package. It integrates with the dotnet test infrastructure built into the .NET Core CLI and when enabled will automatically generate coverage results after tests are run.

Code Coverage

Enabling code coverage is as simple as setting the CollectCoverage property to true

dotnet test /p:CollectCoverage=true

After the above command is run, a coverage.json file containing the results will be generated in the root directory of the test project. A summary of the results will also be displayed in the terminal.

Coverage Output

Coverlet can generate coverage results in multiple formats, which is specified using the CoverletOutputFormat property. Possible values include json (default), lcov and opencover. For example, the following command emits coverage results in the opencover format:

dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

The output folder of the coverage result file can also be specified using the CoverletOutputDirectory property.

Roadmap

  • Branch coverage
  • Console runner (removes the need for requiring a NuGet package)

Issues & Contributions

If you find a bug or have a feature request, please report them at this repository's issues section. Contributions are highly welcome, however, except for very small changes, kindly file an issue and let's have a discussion before you open a pull request.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Build Status
Build status
Coverage Status
License: MIT

coverlet

Coverlet is a cross platform code coverage library for .NET Core, with support for line and method coverage.

Installation

Available on NuGet

Visual Studio:

PM> Install-Package coverlet.msbuild

.NET Core CLI:

dotnet add package coverlet.msbuild

How It Works

Coverlet integrates with the MSBuild system and that allows it to go through the following process:

Before Tests Run

  • Locate the unit test assembly and selects all the referenced assemblies that have PDBs.
  • Instruments the selected assemblies by inserting code to record sequence point hits to a temporary file.

After Tests Run

  • Restore the original non-instrumented assembly files.
  • Read the recorded hits information from the temporary file.
  • Generate the coverage result from the hits information and write it to a file.

Usage

Coverlet deosn't require any additional setup other than including the NuGet package. It integrates with the dotnet test infrastructure built into the .NET Core CLI and when enabled will automatically generate coverage results after tests are run.

Code Coverage

Enabling code coverage is as simple as setting the CollectCoverage property to true

dotnet test /p:CollectCoverage=true

After the above command is run, a coverage.json file containing the results will be generated in the root directory of the test project. A summary of the results will also be displayed in the terminal.

Coverage Output

Coverlet can generate coverage results in multiple formats, which is specified using the CoverletOutputFormat property. Possible values include json (default), lcov and opencover. For example, the following command emits coverage results in the opencover format:

dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

The output folder of the coverage result file can also be specified using the CoverletOutputDirectory property.

Roadmap

  • Branch coverage
  • Console runner (removes the need for requiring a NuGet package)

Issues & Contributions

If you find a bug or have a feature request, please report them at this repository's issues section. Contributions are highly welcome, however, except for very small changes, kindly file an issue and let's have a discussion before you open a pull request.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Dependencies

This package has no dependencies.

Showing the top 10 GitHub repositories that depend on coverlet.msbuild:

Repository Stars
dotnet/machinelearning
ML.NET is an open source and cross-platform machine learning framework for .NET.
dotnet/winforms
Windows Forms is a .NET Core UI framework for building Windows desktop applications.
StephenCleary/AsyncEx
A helper library for async/await.
tmenier/Flurl
Fluent URL builder and testable HTTP client for .NET
lunet-io/markdig
A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
GitTools/GitVersion
Easy Semantic Versioning (http://semver.org) for projects using Git
dotnet/spark
.NET for Apache® Spark™ makes Apache Spark™ easily accessible to .NET developers.
skoruba/IdentityServer4.Admin
The administration for the IdentityServer4 and Asp.Net Core Identity
filipw/dotnet-script
Run C# scripts from the .NET CLI.
stripe/stripe-dotnet
Stripe.net is a sync/async .NET 4.5+ client, and a portable class library for stripe.com.

Version History

Version Downloads Last updated
2.6.3 217,974 7/1/2019
2.6.2 167,970 6/6/2019
2.6.1 258,470 5/8/2019
2.6.0 492,628 3/4/2019
2.5.1 691,098 1/17/2019
2.5.0 201,236 12/20/2018
2.4.0 315,851 11/28/2018
2.3.2 122,434 11/19/2018
2.3.1 393,489 10/16/2018
2.3.0 464,488 9/7/2018
2.2.1 242,257 8/11/2018
2.1.1 204,639 7/16/2018
2.1.0 73,944 7/6/2018
2.0.1 164,214 6/12/2018
2.0.0 57,380 5/17/2018
1.2.0 49,096 5/2/2018
1.1.1 42,481 4/17/2018
1.1.0 2,249 4/16/2018
1.0.2 22,892 4/2/2018
1.0.1 7,898 3/26/2018
1.0.0 3,867 3/21/2018
Show less