Dotnet: Difference between revisions

From MK Wiki EN
Jump to navigation Jump to search
(Add GitLab CI/CD)
Line 20: Line 20:


  ~/.dotnet/tools/reportgenerator
  ~/.dotnet/tools/reportgenerator
== GitLab CI/CD ==
=== .gitlab-ci.yml ===
Which docker image to choose?
* [https://docs.gitlab.com/ee/ci/yaml/ Documentation]
* [https://mcr.microsoft.com/product/dotnet/sdk/about Microsoft Docker Images For Dotnet]


[[Category:Programming]]
[[Category:Programming]]

Revision as of 06:44, 28 February 2023

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?