Code coverage percentage values in Jacoco eclipse plug-in and SonarQube are different

后端 未结 1 752
粉色の甜心
粉色の甜心 2021-01-20 23:51

I have a Java project. The code coverage of that project according to Jacoco eclipse plug-in (EclEmma Java Code Coverage 2.3.1.201405111647) is 22.3%. I generate the .exec repor

相关标签:
1条回答
  • 2021-01-21 00:06

    Jacoco is based on bytecode analysis. The exec file is combined with the class files to get the final code coverage values. The problem in my case was that the bytecode generated by Eclipse compiler for Java (for Jacoco eclipse plug-in) and that produced by Javac (during analysis on sonar runner) were different. Hence, the code coverage values generated by both tools were different.

    0 讨论(0)
提交回复
热议问题