Hey @ganncamp
I have tried dotnet test UnitTests.dll --collect "Code Coverage". This command runs unit test, but not collect coverage and show messages
Data collection : Unable to find a datacollector with friendly name 'Code Coverage'.
Data collection : Could not find data collector 'Code Coverage'
I google this message and found that when call dotnet test command with .dll it can not collect coverage. Command should run using .sln or .cproj
When I run command dotnet test UnitTests.cproj --collect "Code Coverage" I can’t see any useful information in the GitAction log and test coverage doesn’t send into SQ
Creating the coverage report is actually out of scope for us. The docs provide a pointer as a courtesy. If it’s not working for you, you’ll need to investigate elsewhere.
Changes were, added path to the code coverage stats file for the sonar scaner begin command /d:sonar.cs.opencover.reportsPaths=coverage.xml
Run command to collect coverage coverlet .\CC.UnitTests.dll --target "dotnet" --targetargs "test --no-build" -f=opencover -o="coverage.xml"