Sonar は、Cobertura によって生成された Python モジュールのコード カバレッジを表示できません。現在、ビルドとソナーとの統合にジェンキンスを使用しています。私のソナーのプロパティは次のとおりです。
# Info required for Sonar
sonar.sources=module
sonar.language=py
# Additional Configuration
sonar.python.xunit.reportPath=**/nosetests.xml
sonar.python.coverage.reportPath=**/coverage.xml
コンソール出力には次のように表示されます。
12:03:26.458 INFO - Sensor PythonXunitSensor...
12:03:27.305 INFO - Processing report 'nosetests.xml'
12:03:27.305 INFO - Parsing report 'nosetests.xml'
12:03:27.460 INFO - Sensor PythonXunitSensor done: 1002 ms
12:03:27.460 INFO - Sensor PythonCoverageSensor...
12:03:28.216 INFO - Parsing report 'coverage.xml'
12:03:28.269 INFO - Sensor PythonCoverageSensor done: 809 ms
12:03:28.269 INFO - Sensor CpdSensor...
12:03:28.270 INFO - SonarBridgeEngine is used
12:03:28.426 INFO - Cross-project analysis disabled
12:03:29.181 INFO - Sensor CpdSensor done: 912 ms
しかし、ソナーでは単体テストの結果のみが表示され、カバレッジ データは表示されません。デバッグ オプションを使用して実行すると、次のように表示されます。
16:51:23.124 DEBUG - Cannot find the file , ignoring coverage measures
16:51:23.125 DEBUG - Cannot find the file , ignoring coverage measures
16:51:23.125 DEBUG - Cannot find the file , ignoring coverage measures
16:51:23.126 DEBUG - Cannot find the file , ignoring coverage measures
16:51:23.126 DEBUG - Cannot find the file , ignoring coverage measures
ケースとパスも確認しましたが、問題は見つかりませんでした。誰でも私を助けることができますか?