Must-share information (formatted with Markdown):
-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): sonar-scanner-cli-4.7.0.2747-windows
-
what are you trying to achieve: Unit testing code coverage to be included in SonarQube Report
-
what have you tried so far to achieve this
I am attempting to get my SonarQube report to have more than 0.0% code coverage. I have a Typescript/Javascript project running jest unit tests that I am scanning against.
I have included the sonar.javascript.lcov.reportPaths property in the my sonar-project properties file to point to the coverage report produced by jest.
I have verified with debug logs that the scanner found and parsed the file.
I have looked through every doc, forum post and stackoverflow question I could find around this topic, most are centered around adding the correct param and verifying that the scanner is parsing the file which usually resolves the issue. I can not find any posts about what to do if you added the parameter, verified the file is found and parsed yet the coverage report still says 0.0%.
Below you will find screenshots of my properties file, debug logs and scanner report.
-
sonar-project.properties
-
scanner debug logs
- Scanner report