How to integrate multiple unit test reports using SonarQube
I have a couple of Maven projects in my build. Each project has its own unit test cases. I would like to run these test cases and report summary results to SonarQube Server. I am on SonarQube 5.6.
Since there are several Cobertura reports to combine, I couldn't find a better way other than to go from https://docs.sonarqube.org/display/PLUG/Generic+Test+Coverage
I used https://github.com/QualInsight/qualinsight-mojo-cobertura to generate a generic report.
At the sonar level, I don't have multiple modules.
Questions
-
There are several other projects in my assembly, developed using C #, JS / html. I want to see a consolidated report from all projects (regardless of language) integrated on SonarServer. Is the shared test taking the correct approach?
-
When I run the build, I can see the generated coverage.xml and convert-coverage.xml files. I have set the path sonar.genericcoverage.reportPaths and sonar.genericcoverage.unitTestReportPaths. but nothing is suitable for unit testing on the Sonar portal. I checked the logs and got the following
INFO: GenericCoverageSensor INFO: Parse \ target \ cobertura \ ut \ convert-coverage.xml INFO: Imported coverage data for 0 files INFO: Coverage data is ignored for 33 unknown files, including: SRC / main / Java / COM /application/AppInfoService.java SRC / home / Java / COM / application / Service.java SRC / home / Java / COM / application / F1Service.java SRC / home / Java / COM / application / JobService.java SRC / home / Java /COM/application/L1.java INFO: Imported IT coverage data for 0 files INFO: Imported. Total coverage data for 0 files. INFO: Imported unit test data for 0 files What's missing here Why sonar could not parse the overall code coverage report.
Any help is greatly appreciated.
Atula
source to share
No one has answered this question yet
Check out similar questions: