DEV Community

freecoderzhaoshuai
freecoderzhaoshuai

Posted on

DotNet core code coverage

You scanner begin should include the code coverage property

dotnet sonarscanner begin /k:“project-key” /d:sonar.cs.vscoveragexml.reportsPaths=\TestResults*.coveragexml
dotnet build my.sln
dotnet test myTest.csproj --collect:“Code Coverage”
powershell script to convert .coverage to coveragexml
dotnet sonarscanner end

Top comments (1)

Collapse
 
insight_it_891bf8cd689700 profile image
Insight IT

Nice and informative content,
Thanks for sharing with us,
We are providing Best Dot NET Training in Hyderabad,

DOT NET Training in Hyderabad
DOT NET Online Training in Hyderabad
DOT NET Online Course in Hyderabad