Dotnet: Difference between revisions

From MK Wiki EN
Jump to navigation Jump to search
(Created page with "Notes about Microsoft's "dotnet" system. == Code Coverage == === Prerequisites === dotnet tool install -g dotnet-reportgenerator-globaltool === Performing === dotnet test --collect:"XPlat Code Coverage" This command creates a file with the name "coverage.cobertura.xml". reportgenerator -reports:"./path/to/coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html This command creates a HTML report in directory "coveragereport". Category:Programmi...")
 
Line 16: Line 16:


This command creates a HTML report in directory "coveragereport".
This command creates a HTML report in directory "coveragereport".
If <code>reportgenerator</code> could not be found, its location can be specified manually:
~/.dotnet/tools/reportgenerator


[[Category:Programming]]
[[Category:Programming]]

Revision as of 17:07, 16 February 2023

Notes about Microsoft's "dotnet" system.

Code Coverage

Prerequisites

dotnet tool install -g dotnet-reportgenerator-globaltool

Performing

dotnet test --collect:"XPlat Code Coverage"

This command creates a file with the name "coverage.cobertura.xml".

reportgenerator -reports:"./path/to/coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html

This command creates a HTML report in directory "coveragereport".

If reportgenerator could not be found, its location can be specified manually:

~/.dotnet/tools/reportgenerator