When I execute sonar-sccaner from my local system it works well and I can see coverage report on UI
But when same is executed form Jenkins it does not show coverage report:
Following command I am executing from local machine and from Jenkins pipeline:
sonar-scanner -Dsonar.projectKey=XXXXXX -Dsonar.python.xunit.reportPath=‘build_results/testresults.xml’ -Dsonar.python.pylint.reportPath=pylint-report.txt -Dsonar.python.coverage.reportPaths=‘build_results/coverage.xml’
Following is log line from local
16:08:14.019 DEBUG: Using pattern ‘build_results/coverage.xml’ to find reports
16:08:15.314 INFO: Python test coverage
16:08:15.316 INFO: Parsing report ‘/Users/falak.shah/xxxx/xxxx/xxxxx/build_results/coverage.xml’
Following is log line from Jenkins server
16:32:37.850 INFO: Sensor Python Squid Sensor [python] (done) | time=10477ms
16:32:37.851 INFO: Sensor Cobertura Sensor for Python coverage [python]
16:32:37.852 DEBUG: Using pattern ‘build_results/coverage.xml’ to find reports
16:32:38.234 WARN: No report was found for sonar.python.coverage.reportPaths using pattern build_results/coverage.xml
16:32:38.234 INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=383ms
16:32:38.234 INFO: Sensor PythonXUnitSensor [python]
16:32:38.235 DEBUG: Using pattern ‘build_results/testresults.xml’ to find reports
16:32:38.455 INFO: Processing report ‘/Users/Shared/Jenkins/Home/workspace/test/build_results/testresults.xml’
You can see that it is able to parse unit test result file successfully but giving error for coverage.xml
Note: Using SonarQube - Community Edition Version 7.7 (build 23042)