dotnet new tool-manifest
dotnet tool install dotnet-reportgenerator-globaltool
- Run:
dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:CoverletOutputFormat=cobertura /p:CoverletOutput='./coverage.cobertura.xml'
- Report:
dotnet reportgenerator -reports:./coverage.cobertura.net8.0.xml -targetdir:./TestResults -reporttypes:Html
In one Go!
dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:CoverletOutputFormat=cobertura /p:CoverletOutput='./coverage.cobertura.xml'
dotnet reportgenerator -reports:./coverage.cobertura.net8.0.xml -targetdir:./TestResults -reporttypes:Html