Top 4 C# Code Coverage Projects
-
Coverlet works really well.
-
ReportGenerator
ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.
# https://github.com/danielpalme/ReportGenerator dotnet tool install -g dotnet-reportgenerator-globaltool dotnet test --collect:"XPlat Code Coverage" reportgenerator -reports:"\TestResults\**\coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Fine Code Coverage
Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
If you start writing unit tests, I highly recommend Fine Code Coverage to see what percentage of your code has been reached by the existing unit tests: https://github.com/FortuneN/FineCodeCoverage
-
CodeCoverageSummary
A GitHub Action that reads Cobertura format code coverage files and outputs a text or markdown summary.
Additionally, PRs to the project should get a comment like the below from the CodeCoverageSummary Github Action
C# Code Coverage related posts
Index
What are some of the best open-source Code Coverage projects in C#? This list will help you:
Project | Stars | |
---|---|---|
1 | coverlet | 2,486 |
2 | ReportGenerator | 1,834 |
3 | Fine Code Coverage | 270 |
4 | CodeCoverageSummary | 55 |
Are you hiring? Post a new remote job listing for free.