Python Sonar Coverage

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube

  • what are you trying to achieve
    To display coverage % in sonar dashboard for our office project

  • what have you tried so far to achieve this
    Generated coverage xml report using coverage python package. Used that XML report and passed it as " -Dsonar.python.coverage.reportPaths " in the sonar command under Jenkins. But sonar dashboard does not show the coverage % in the UI.

The coverage.xml file was generated from a different path in a UNIX machine. Could the “sources” be an issue why it is not displaying in the UI dashboard? what should be the value of “sources” in the Coverage XML file?

Hey there.

It’s difficult to discuss these things theoretically – can you provide a copy of your scanner logs as well as the coverage report?