私はソーナーにテストカバレッジレポートとユニットテストの詳細(テストケースの数、合格したテストケース数)を取得しようとしています。nosetestsを使用したユニットテストの数が、pythonコードベースのソナーレポートに反映されていません
私はカバレッジとnosetestsプラグインを使用してレポートを生成し、coverage.xmlに同じ保存されているとnosetests.xml
マイsonar.propertiesファイル私は取得していますソナーランナーを実行している間
sonar.projectKey=python
sonar.projectName=Python
sonar.projectVersion=1.0
sonar.sources=vmturbo
sonar.tests=tests
sonar.language=py
sonar.sourceEncoding=UTF-8
sonar.python.xunit.reportPath=nosetests.xml
sonar.python.coverage.reportPath=coverage.xml
のように見えます以下のメッセージがログに表示されます
0:29:51.022 INFO - Processing report '/Users/deepeshjain/Development/Python/CD/python-distribution/nosetests.xml'
00:29:51.027 WARN - The resource for 'vmturbo_unit_tests.Test' is not found, drilling down to the details of this test won't be possible
00:29:51.027 INFO - Sensor PythonXUnitSensor (done) | time=115ms
00:29:51.027 INFO - Sensor SCM Sensor
00:29:51.050 INFO - Sensor SCM Sensor (done) | time=23ms
00:29:51.051 INFO - Sensor Python Squid Sensor
00:29:51.221 INFO - Python unit test coverage
00:29:51.223 INFO - Parsing report '/Users/deepeshjain/Development/Python/CD/python-distribution/coverage.xml'
00:29:51.229 INFO - Python integration test coverage
00:29:51.232 INFO - Python overall test coverage
00:29:51.234 INFO - Sensor Python Squid Sensor (done) | time=183ms
ソナーのテストカバレッジレポートを取得することはできますが、同じ単位テストケースの数を取得することはできません。
nosetests.xml
のsed -iさん/クラス名= 『/クラス名=』 tests./g '、私はnostests.xml –