In azure devops build pipeline, I am having the below stages.
- Prepare analysis on sonar cloud
- dotnet restore
- dotnet build
- dotnet test
- dontnet publish
- copy test files .. this for copying (*.trx *.xml) to respective directory.
- Run code analysis
- Publish quality gate result.
here my pipeline runs successfully with the tests but its not giving code coverage. code coverage showing 0.00%
*.trx file is copying on the required path & I have also tried with the default path of trx file but its giving below message in logs.
ERROR MESSAGE
Post-processing started.
00:23:49.775 Property 'sonar.cs.vstest.reportsPaths' provided, skipping the search for TRX files in default folders.
00:23:49.995 Did not find any binary coverage files in the expected location.
00:23:49.995 Falling back on locating coverage files in the agent temp directory.
00:23:49.995 Searching for coverage files in D:\a\_temp
00:23:49.995 No coverage files found in the agent temp directory.
WARNING: The following projects do not have a valid ProjectGuid and were
not built using a valid solution (.sln) thus will be skipped from
analysis...
D:\a\1\s\Rost.API.Tests\Rost.API.Tests.csproj
I expect the code coverage in the pipeline, currently code coverage showing 0.00%.