Hi Colin,
I have another dotnet project where code coverage is reflecting for which we have used the same sonar configuration and dotnet test task arguments. So, I have compared between logs between these projects and found the following difference
logs of Dotnet project for which code coverage is calculating
Sensor C# Tests Coverage Report Import [csharp]
WARN: Could not find any coverage report file matching the pattern ‘D:\a\1\s/**/coverage.opencover.xml’. Troubleshooting guide: [Coverage] Troubleshooting guide for .NET code coverage import
INFO: Parsing the Visual Studio coverage XML report D:\a_temp\6b5c2bc9-e001-49c7-8edc-c7ba05a61044\VssAdministrator_fv-az2457-7_2024-06-27.05_18_16.coveragexml
INFO: Adding this code coverage report to the cache for later reuse: D:\a_temp\6b5c2bc9-e001-49c7-8edc-c7ba05a61044\VssAdministrator_fv-az2457-7_2024-06-27.05_18_16.coveragexml
INFO: Coverage Report Statistics: 111 files, 94 main files, 94 main files with coverage, 17 test files, 0 project excluded files, 0 other language files.
INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=661ms
INFO: Sensor C# Unit Test Results Import [csharp]
INFO: Parsing the Visual Studio Test Results file ‘D:\a_temp\VssAdministrator_fv-az2457-7_2024-06-27_05_18_21.trx’.
INFO: Sensor C# Unit Test Results Import [csharp] (done) | time=19ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=3ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 178 source files to be analyzed
WARN: Shallow clone detected, no blame information will be provided. You can convert to non-shallow with ‘git fetch --unshallow’.
INFO: SCM Publisher 0/178 source files have been analyzed (done) | time=13ms
logs of Dotnet project for which code coverage is 0% always
Sensor C# Tests Coverage Report Import [csharp]
2024-06-28T05:33:37.3027069Z WARN: Could not find any coverage report file matching the pattern ‘/home/vsts/work/1/s/**/coverage.opencover.xml’. Troubleshooting guide: [Coverage] Troubleshooting guide for .NET code coverage import
2024-06-28T05:33:37.3036711Z INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=31ms
2024-06-28T05:33:37.3044238Z INFO: Sensor C# Unit Test Results Import [csharp]
2024-06-28T05:33:37.3096091Z INFO: Parsing the Visual Studio Test Results file ‘/home/vsts/work/_temp/_fv-az407-33_2024-06-28_05_32_00.trx’.
2024-06-28T05:33:37.4426486Z INFO: Sensor C# Unit Test Results Import [csharp] (done) | time=138ms
2024-06-28T05:33:37.4439788Z INFO: Sensor Zero Coverage Sensor
2024-06-28T05:33:37.5238431Z INFO: Sensor Zero Coverage Sensor (done) | time=80ms
2024-06-28T05:33:37.5334399Z INFO: SCM Publisher SCM provider for this project is: git
2024-06-28T05:33:37.5359458Z INFO: SCM Publisher 1056 source files to be analyzed
2024-06-28T05:33:37.5391640Z WARN: Shallow clone detected, no blame information will be provided. You can convert to non-shallow with ‘git fetch --unshallow’.
2024-06-28T05:33:37.5399567Z INFO: SCM Publisher 0/1056 source files have been analyzed (done) | time=2ms
For these two projects, able to generate .trx file and …coverage file
Could you please help me with these details
Thank you