Is there a plugin which will load a jacoco-it.exec

2019-06-14 15:13发布

问题:

In reading many posts there are many cases where users have used the jacoco agent to generate coverage data (i.e. created an exec data file either jacoco.exec or jacoco-it.exec). However, there are a number of questions about getting the data into SonarQube. In many of these use cases by the time the exec data file is created it is disassociated from the build time project structure. Can you load a jacoco exec data file into SonarQube without having related class or source files? If yes, could you point to some documentation or example.

回答1:

Everything in SonarQube is based on the source code. You cannot read/load unit test coverage data without source code to which to attach the data.

EDIT

For full Java analysis, the class files must be present as well. You can run analysis without them, but it will be less accurate.