Last active
December 11, 2019 02:16
-
-
Save DanielMPries/797a2a0183ed0e7da857910f87431ad2 to your computer and use it in GitHub Desktop.
Coverlet settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add coverlet to the test project(s) | |
dotnet add package coverlet.msbuild | |
# or for VSTest | |
# dotnet add package coverlet.collector | |
# Add the coverlet global cli tool | |
dotnet tool install --global coverlet.console | |
# coverage gutters vscode extension | |
ext install ryanluker.vscode-coverage-gutters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [{ | |
"label": "Unit test with coverage", | |
"command": "dotnet", | |
"type": "process", | |
"args": [ | |
"test", | |
"/p:CollectCoverage=true", | |
"/p:CoverletOutputFormat=lcov", | |
"/p:CoverletOutput=./lcov", | |
//"/p:Threshold=80", // #RelationshipGoals | |
"/p:ThresholdType=line", | |
"/p:ThresholdStat=total", | |
"--filter", | |
"TestCategory=Unit" | |
], | |
"problemMatcher": "$msCompile", | |
"group": { | |
"kind": "test", | |
"isDefault": true | |
} | |
}, | |
{ | |
"label": "List unit tests ", | |
"command": "dotnet", | |
"type": "process", | |
"args": [ | |
"test", | |
"--list-tests", | |
"--filter", | |
"TestCategory=Unit" | |
], | |
"problemMatcher": "$msCompile", | |
"group": { | |
"kind": "test", | |
"isDefault": true | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment