Reputation: 331
I have an issue with test coverage. When I run this command
dotnet test ../XZrcndee.sln --output ../coverage /p:CollectCoverage=true /p:CoverletOutput=results\coverage /p:CoverletOutput=..\results\coverage /p:MergeWith=..\results\coverage.json /p:CoverletOutputFormat="opencover"
It show me that codecoverage is 0
When I try run dotnet test in only one project I got the correct result.
dotnet test ../XZrcndee.Domain.Tests/XZrcndee.Domain.Tests.csproj --output ../coverage /p:CollectCoverage=true /p:CoverletOutput=results\coverage /p:CoverletOutput=..\results\coverage /p:MergeWith=..\results\coverage.json /p:CoverletOutputFormat="opencover"
Do I miss somthing?
Kind Regards
Upvotes: 1
Views: 789
Reputation: 2600
Try this
dotnet test ../XZrcndee.sln --output ../coverage /p:CollectCoverage=true /p:CoverletOutput=results\coverage /p:CoverletOutput=..\results\coverage /p:MergeWith=..\results\coverage.json /p:CoverletOutputFormat="opencover" /maxcpucount:1
make sure to cleanup the "coverage.json" after each run otherwise it will merge results from mulitple runs also.
Upvotes: 1