dotnet test --collect:"XPlat Code Coverage" not considering Api project #1411
Unanswered
LokanathCalyx
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to generate Code coverage report in 2 ways.
Using Fine Code Coverage. There i see all 3 projects of me covered & its % of coverage.
Using Azure devops Pipeline where i use DotNetCoreCLI@2& PublishCodeCoverageResults@1 to build & generate the report. But the issue is API project is not considered in the report. both in trx & xml file.
So i tried MSBuild commands to repro the issue. To run the test cases & to build the xml file i am using below command.
dotnet test --collect:"XPlat Code Coverage"
After that to publish the coverage using below command.
dotnet test /p:CollectCoverage=true
Issue:- In above command also , i don't see my Api Project is getting into report, where as i see the API layer unit test are running. tried with [include] but seems not working.
Below is my project structure( using clean code architecture/Onion architecture)
Beta Was this translation helpful? Give feedback.
All reactions