I have a build pipeline where i have integrtaed sonar prepare analysis ,Run and publish analysis tasks configured.
I see the unit tests are getting executed and also there is a coverage report which i download and see in the VS 2017 but the build fails showing code coverage is less than< 80 as that is org level check/setting.
Prepare Analysis has below setting
Have attached the error log which i get in the Run analysis step.I see the cooveragexml is also getting generated but in logs it is showing skipping Test files see small snippet below.
Parsing the Visual Studio coverage XML report D:\a\_temp\TestResults\2a78726f-c71e-4e9a-baa0-769dd16b026b\VssAdministrator_fv-az121-164_2021-04-09.12_49_21.coveragexml
2021-04-09T12:52:38.8060448Z 12:52:38.770 INFO: Adding this code coverage report to the cache for later reuse: D:\a_temp\TestResults\2a78726f-c71e-4e9a-baa0-769dd16b026b\VssAdministrator_fv-az121-164_2021-04-09.12_49_21.coveragexml
2021-04-09T12:52:38.8061243Z 12:52:38.771 DEBUG: Analyzing coverage after aggregate found ‘6’ coverage files.
2021-04-09T12:52:38.8061937Z 12:52:38.771 DEBUG: Skipping ‘D:\a\1\s\Source\Source\Tests\CCH.PotalServiceUnitTests\DataManager\UserDataManagerUnitTest.cs’ as it is a test file.
2021-04-09T12:52:38.8062744Z 12:52:38.772 DEBUG: Skipping ‘D:\a\1\s\Source\Source\Tests\CCH.PotalServiceUnitTests\BusinessManager\PortalBusinessManagerUnitTest.cs’ as it is a test file.
2021-04-09T12:52:38.8063841Z 12:52:38.772 DEBUG: Skipping ‘D:\a\1\s\Source\Source\Tests\CCH.PotalServiceUnitTests\BusinessManager\PortalIntegrationBusinessManagerUnitTest.cs’ as it is a test file.
2021-04-09T12:52:38.8064692Z 12:52:38.772 DEBUG: Skipping ‘D:\a\1\s\Source\Source\Tests\CCH.PotalServiceUnitTests\DataManager\PortalIntegrationDataManagerUnitTest.cs’ as it is a test file.
2021-04-09T12:52:38.8065482Z 12:52:38.772 DEBUG: Skipping ‘D:\a\1\s\Source\Source\Tests\CCH.PotalServiceUnitTests\DataManager\PortalDataManagerUnitTest.cs’ as it is a test file.
2021-04-09T12:52:38.8066285Z 12:52:38.772 DEBUG: Skipping ‘D:\a\1\s\Source\Source\Tests\CCH.PotalServiceUnitTests\BusinessManager\UserBusinessManagerUnitTest.cs’ as it is a test file.
2021-04-09T12:52:38.8067387Z 12:52:38.772 DEBUG: The total number of file count statistics is ‘6’.
2021-04-09T12:52:38.8079418Z 12:52:38.773 INFO: Coverage Report Statistics: 6 files, 0 main files, 0 main files with coverage, 6 test files, 0 project excluded files, 0 other language files.
2021-04-09T12:52:38.8556733Z 12:52:38.773 WARN: The Code Coverage report doesn’t contain any coverage data for the included files. For troubleshooting help, please visit our community forum