Dotnet

From MK Wiki EN
Revision as of 06:44, 28 February 2023 by MkWikiEnSysOp (talk | contribs) (Add GitLab CI/CD)
Jump to navigation Jump to search

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

GitLab CI/CD

.gitlab-ci.yml

Which docker image to choose?