coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.99k stars 387 forks source link

Unable include code coverage for nunit unit test project in the coverlet and covertura configin azure pipeline with yml for .net 8 project #1687

Open bj-kbj opened 2 months ago

bj-kbj commented 2 months ago

I have 3 projects in my solution including the test project. I get only 2 project in code coverage result in the azure pipeline and also same in local coverage.cobertura.xml file which excludes the test project. I want to include the test project also in the code coverage.I am trying to get the code coverage in the azure pipeline for the solution which should include the code coverage for my nunit test project also. However it's not working below is my yml change.

Run tests with Coverlet code coverage and include the test project in coverage results

Publish code coverage results

Bertk commented 2 months ago

Please set property IncludeTestAssembly in runsettings file and build the test assembly before executing the test. see Advanced Options (Supported via runsettings)

image