SonarQube: Multiple unit test and code coverage result files

点点圈 提交于 2019-12-23 21:14:04

问题


we have the following structure in our project:

  • maven project 1
  • maven project 2
    • module 1
    • module 2
    • module 3
  • maven project 3

Project 1 and 3 have each one unit test and code coverage result file. They are no problem. Project 2 has three unit test and code coverage result files, one for each module.

Now I want to show the unit test and code coverage in SonarQube. But I can only configure one result file (sonar.surefire.reportsPath and sonar.emma.reportPath).

How can I configure the three files, or do I have to merge the files?


回答1:


You have to configure sonar.surefire.reportsPath and sonar.emma.reportPath for each module. This can't be done from command line, so you have to do it in pom.xml of each module.

Please note that if you are using default Maven settings I'm quite sure you don't need to specify sonar.surefire.reportsPath and sonar.emma.reportPath at all because SonarQube will look at standard location by default.



来源:https://stackoverflow.com/questions/17650322/sonarqube-multiple-unit-test-and-code-coverage-result-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!