dotnet new tool-manifest
dotnet tool install dotnet-reportgenerator-globaltool
dotnet tool update dotnet-reportgenerator-globaltool
📝 The produced coverage.cobertura file is per .NET version ex. coverage.cobertura.net9.0.xml
- Run:
dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:CoverletOutputFormat=cobertura /p:CoverletOutput='../coverage.cobertura.xml'
- Report:
dotnet reportgenerator -reports:./coverage.cobertura.net9.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.net9.0.xml -targetdir:./TestResults -reporttypes:Html