I'm running a pretty simple set of python projects through sonar-runner and am having issues getting tests to show up.
I'm running Sonar 3.2.1, with Python Plugin 1.1. The coverage report is generated previously.
I have the following set:
sonar.dynamicAnalysis=reuseReports
sonar.core.codeCoveragePlugin=cobertura
sonar.python.coverage.reportPath=coverage.xml
No matter what I do at this point, the coverage does not show up.
My tests are in the same folder as my sources... could that be the issue? Is there a requirement for how source code is laid out for the coverage report to get analayzed properly by sonar?
Edit: Adding a few more notes...
- It is a multiproject python instance. I have three projects in there. Everything else seems to show up properly on the sonar report. I'v defined the base and source directories for each and the coverage.xml file has been pre-generated into the base directories of each.
The coverage widget shows up but shows:
Code coverage - Unit test success 0 tests
I'm also seeing when I run sonar-runner:
10:04:29.641 INFO p.PhasesTimeProfiler - Sensor PythonCoverageSensor... 10:04:29.642 INFO .p.c.CoberturaParser - Parsing report '/home/jenkins/jobs/myproject/workspace/trunk/src/python/coverage.xml' 10:04:29.883 INFO p.PhasesTimeProfiler - Sensor PythonCoverageSensor done: 242 ms