Push coverage Reports to Sonarqube - Question

Hi Team,

I have a question regarding coverage reports in sonarqube. I know that sonarqube can’t generate the converage, but instead we can pass the coverage reports as command line parameters. I am performing code coverage testing with maven and gradle and it generates
the reports for us to import into sonarqube. I would like to know the command line parameters for all languages that we can use pass it as a paramter to the sonar-scanner command to import the reports into sonarqube server.

We dn’t want to use the build tools mvn or gradle to push the reports like (mvn sonar:sonar or gradle sonarqube) but want to use sonar-scanner with command line parameters to push reports.

I have found the below param to use but its applicable to only few languages. What about the param for all languages?

There is a param available sonar.coverageReportPaths for all languages but it is forcing us to use in specific format (Genertic Test Data). Does it work if pass the report path to it? I know I can test it but wanted to confirm the right parameter.


Hi Prasad,

For the parameter names, the docs should help.

Note that they don’t have to be passed on the command line. You can also put them in your properties file.


My question is can we pass the xml reports being generated as an input to the sonar.coverageReportPaths option.


That parameter only takes the Generic Coverage report format.


1 Like