Coverage report not displaying on sonarqube

SonarQube version 8.7
SonarScanner 4.3.0.210
Jest Sonar Reporter https://www.npmjs.com/package/jest-sonar-reporter

Karma Sonarqube Unit Reporter GitHub - tornaia/karma-sonarqube-unit-reporter: A Karma plugin. Unit tests execution report for SonarQube/Generic Coverage Plugin

Test Coverage:

https://docs.sonarqube.org/8.7/analysis/coverage/

https://docs.sonarqube.org/8.7/analysis/analysis-parameters/

using sonar.testExecutionReportPaths and
sonar.javascript.lcov.reportPaths, also have tried sonar.typescript.lcov.reportPaths

Project uses react script and jest for generating reports

build is successful with sonar scan but on sonar server there is no code coverage.

Hi,

Welcome to the community!

First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.7 → 8.9.4 → 9.2.2 (last step optional)

You may find the Upgrade Guide helpful.

Regarding your question, from the docs it seems that Jest/Karma are usable to provide something that would be consumed with the sonar.coverageReportPaths parameter. I suggest you check your analysis logs to see how/whether the parameters you’ve provided are consumed.

 
Ann

Thanks, G Ann, We have upgraded our sonarqube to 8.9.5. I have requested the team to add the sonar.coverageReportPaths parameter as well. I will inform on the outfome.

1 Like