KellysonRN / code-quality-labs

Learn time: Code coverage and SonarQuber

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Quality Labs

Build badge

Overview

Learn Time: Experiments with Coverlet to generate code coverage reports.

Features

Requirements

The project requires .NET 6.0.

Compatible IDEs

Tested on:

  • Visual Studio Code (1.76.2)

Useful commands

From the terminal/shell/command line tool, use the following commands to build, test and run the API.

  • Build the project

dotnet build
  • Run the tests

# Note: During my experiments ( March, 2023 ) the .NET7 had issues to execute this command.
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura

Code Coverage report

# Install the ReportGenerator
dotnet tool install -g dotnet-reportgenerator-globaltool
# Generate reports
reportgenerator -reports:"**/**/coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html

About

Learn time: Code coverage and SonarQuber

License:Apache License 2.0


Languages

Language:C# 100.0%