All Projects → shanselman → dotnetcoreunittestingwithcoverageinvscode

shanselman / dotnetcoreunittestingwithcoverageinvscode

Licence: other
dotnetcoreunittestingwithcoverageinvscode

Programming Languages

C#
18002 projects
Batchfile
5799 projects

Using VS Code, Coverlet, xUnit, plus these extensions

Image of it all together

Note the tasks.json, specifically this part. If you name the file lcov.info, the Coverage Gutters extension will pick up and color the line numbers.

        {
            "label": "test with coverage",
            "command": "dotnet",
            "type": "process",
            "args": [
                "test",
                "/p:CollectCoverage=true",
                "/p:CoverletOutputFormat=lcov",
                "/p:CoverletOutput=./lcov.info",
                "${workspaceFolder}/The.Tests/The.Tests.csproj"
            ],
            "problemMatcher": "$msCompile",
            "group": {
                "kind": "test",
                "isDefault": true
            }
        },
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].