Skip to content

Commit

Permalink
馃ИAdd results-directory option to dotnet test tasks (microsoft#812)
Browse files Browse the repository at this point in the history
This commit adds the --results-directory option to the dotnet test tasks
in the .vscode/tasks.json file. This option specifies the directory
where the test results and code coverage reports are stored. By setting
this option, the test tasks can avoid cluttering the default TestResults
folder in the solution root. The commit also adds a new test task that
runs all the tests in the dotnet folder with code coverage enabled.
  • Loading branch information
lemillermicrosoft authored and codebrain committed May 16, 2023
1 parent 89bc193 commit 380e572
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
"type": "process",
"args": [
"test",
"--results-directory",
"${workspaceFolder}/dotnet/TestResults/",
"--collect",
"XPlat Code Coverage;Format=lcov",
"--filter",
Expand All @@ -143,6 +145,8 @@
"type": "process",
"args": [
"test",
"--results-directory",
"${workspaceFolder}/dotnet/TestResults/",
"--collect",
"XPlat Code Coverage;Format=lcov",
"--filter",
Expand All @@ -159,12 +163,37 @@
"cwd": "${workspaceFolder}/dotnet/src/Extensions/Extensions.UnitTests/"
}
},
{
"label": "Test - ALL (Code Coverage)",
"command": "dotnet",
"type": "process",
"args": [
"test",
"--results-directory",
"${workspaceFolder}/dotnet/TestResults/",
"--collect",
"XPlat Code Coverage;Format=lcov",
"--filter",
"${input:filter}"
],
"problemMatcher": "$msCompile",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"options": {
"cwd": "${workspaceFolder}/dotnet/"
}
},
{
"label": "Test - Semantic-Kernel Integration (Code Coverage)",
"command": "dotnet",
"type": "process",
"args": [
"test",
"--results-directory",
"${workspaceFolder}/dotnet/TestResults/",
"--collect",
"XPlat Code Coverage;Format=lcov",
"--filter",
Expand Down

0 comments on commit 380e572

Please sign in to comment.