[c#] What can I use for good quality code coverage for C#/.NET?

I wonder what options there are for .NET (or C# specifically) code coverage, especially in the lower priced segment?

I am not looking for recommendations, but for a comparison of products based on facts. I know the following:

This question is related to c# .net code-coverage

The answer is


There are pre-release (beta) versions of NCover available for free. They work fine for most cases, especially when combined with NCoverExplorer.


We've released EAP to dotCover and will be releasing the beta version soon.


An alternative to NCover can be PartCover, is an open source code coverage tool for .NET very similar to NCover, it includes a console application, a GUI coverage browser, and XSL transforms for use in CruiseControl.NET.

It is a very interesting product.

OpenCover has replaced PartCover.


C# Test Coverage Tool has very low overhead, handles huge systems of files, intuitive GUI showing coverage on specific files, and generated report with coverage breakdown at method, class, and package levels.


I just tested out NCrunch and have to say I am very impressed. It is a continuous testing tool that will add code coverage to your code in Visual Studio at almost real time. At the time as I write this NCrunch is free. It is a little unclear if it going to be free, cost money or be opened source in the future though.


TestMatrix is a unit test runner and code coverage tool.


There are pre-release (beta) versions of NCover available for free. They work fine for most cases, especially when combined with NCoverExplorer.


I just tested out NCrunch and have to say I am very impressed. It is a continuous testing tool that will add code coverage to your code in Visual Studio at almost real time. At the time as I write this NCrunch is free. It is a little unclear if it going to be free, cost money or be opened source in the future though.


We've released EAP to dotCover and will be releasing the beta version soon.


There are pre-release (beta) versions of NCover available for free. They work fine for most cases, especially when combined with NCoverExplorer.


TestCocoon is also pretty nice. It is in active development and has a user community:

  • Open source (GPL 3)
  • Supports C/C++/C# cross platform (Linux, Windows, and Mac)
  • CoverageScanner - Instrumentation during the Generation
  • CoverageBrowser - View, Analysis and Management of Code Coverage Result

However, TestCocoon is no longer developed and its creators are now producing a commercial software for C/C++.


Code coverage features, as well as programmable API's, come with Visual Studio 2010. Sadly, the only two editions that include the full Code Coverage capabilities are Premium and Ultimate. However, I do believe the API's will be available with any edition, so creating code coverage files and writing a viewer for the coverage info would likely be possible.


TestCocoon is also pretty nice. It is in active development and has a user community:

  • Open source (GPL 3)
  • Supports C/C++/C# cross platform (Linux, Windows, and Mac)
  • CoverageScanner - Instrumentation during the Generation
  • CoverageBrowser - View, Analysis and Management of Code Coverage Result

However, TestCocoon is no longer developed and its creators are now producing a commercial software for C/C++.


An alternative to NCover can be PartCover, is an open source code coverage tool for .NET very similar to NCover, it includes a console application, a GUI coverage browser, and XSL transforms for use in CruiseControl.NET.

It is a very interesting product.

OpenCover has replaced PartCover.


C# Test Coverage Tool has very low overhead, handles huge systems of files, intuitive GUI showing coverage on specific files, and generated report with coverage breakdown at method, class, and package levels.


JetBrains (of ReSharper fame) has been working on a coverage tool for a little while called dotCover. It's showing a great deal of promise.


TestMatrix is a unit test runner and code coverage tool.


See the C# Test Coverage tool from my company, Semantic Designs:

It has very low overhead, handles huge systems of files, intuitive GUI, howing coverage on specific files, and generated report with coverage breakdown at method, class and package levels.


An alternative to NCover can be PartCover, is an open source code coverage tool for .NET very similar to NCover, it includes a console application, a GUI coverage browser, and XSL transforms for use in CruiseControl.NET.

It is a very interesting product.

OpenCover has replaced PartCover.


I am not sure what the difference is with the retail NCover, but there is also an NCover project on SourceForge that is of course open source and free.


JetBrains (of ReSharper fame) has been working on a coverage tool for a little while called dotCover. It's showing a great deal of promise.


I am not sure what the difference is with the retail NCover, but there is also an NCover project on SourceForge that is of course open source and free.


An alternative to NCover can be PartCover, is an open source code coverage tool for .NET very similar to NCover, it includes a console application, a GUI coverage browser, and XSL transforms for use in CruiseControl.NET.

It is a very interesting product.

OpenCover has replaced PartCover.


Code coverage features, as well as programmable API's, come with Visual Studio 2010. Sadly, the only two editions that include the full Code Coverage capabilities are Premium and Ultimate. However, I do believe the API's will be available with any edition, so creating code coverage files and writing a viewer for the coverage info would likely be possible.


Examples related to c#

How can I convert this one line of ActionScript to C#? Microsoft Advertising SDK doesn't deliverer ads How to use a global array in C#? How to correctly write async method? C# - insert values from file into two arrays Uploading into folder in FTP? Are these methods thread safe? dotnet ef not found in .NET Core 3 HTTP Error 500.30 - ANCM In-Process Start Failure Best way to "push" into C# array

Examples related to .net

You must add a reference to assembly 'netstandard, Version=2.0.0.0 How to use Bootstrap 4 in ASP.NET Core No authenticationScheme was specified, and there was no DefaultChallengeScheme found with default authentification and custom authorization .net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible Update .NET web service to use TLS 1.2 EF Core add-migration Build Failed What is the difference between .NET Core and .NET Standard Class Library project types? Visual Studio 2017 - Could not load file or assembly 'System.Runtime, Version=4.1.0.0' or one of its dependencies Nuget connection attempt failed "Unable to load the service index for source" Token based authentication in Web API without any user interface

Examples related to code-coverage

Code coverage with Mocha How to configure multi-module Maven + Sonar + JaCoCo to give merged coverage report? Clearing coverage highlighting in Eclipse What can I use for good quality code coverage for C#/.NET? What is code coverage and how do YOU measure it? What is a reasonable code coverage % for unit tests (and why)?