Learn Time: Experiments with Coverlet to generate code coverage reports.
- C#
- XUnit
- GitHub Actions
- Coverlet Coverage
- ReportGenerator
- SonarCloud
The project requires .NET 6.0.
Tested on:
- Visual Studio Code (1.76.2)
From the terminal/shell/command line tool, use the following commands to build, test and run the API.
dotnet build
# Note: During my experiments ( March, 2023 ) the .NET7 had issues to execute this command.
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
# Install the ReportGenerator
dotnet tool install -g dotnet-reportgenerator-globaltool
# Generate reports
reportgenerator -reports:"**/**/coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html