Code coverage is not reflecting in sonarQube

Hello,

I am trying to get code coverage in sonarQube for a visual studio project, I have a unit test project that generates a .exe file and a project for which the unit test has to be done.

I tried to generate the code coverage from the visual studio for the C/C++ project following this link: [Coverage & Test Data] Generate Reports for Apex, C/C++, Objective-C, Go, JS/TS and Python.

The .xml file I used is as follows:
C:\SonarQube\sonar-scanner-4.7.0.2747-windows\bin\sonar-scanner.bat -D"sonar.projectKey=MyTestProjectKey" -D"sonar.sources=." -D"sonar.cfamily.build-wrapper-output=bw-output" -D"sonar.cfamily.vscoveragexml.reportsPath= <<.xml PATH>>" -D"sonar.host.url=<>" -D"sonar.login=<>"

But the issue is the .xml file seems empty. Also, I tried to generate .coveragexml from visual studio “Test->Analyze code coverage for all tests” but if I use that still no coverage is getting displayed on sonarQube.

FYI, I am using the visual studio enterprise 2019 edition. Any help regarding getting code coverage for a C/C++ project is appreciated.

Thanks.

Hi,

Are you saying your coverage report is empty? If so, that’s going to be the first, step, but getting there is out of scope for this community.

 
Ann