<small id='Xt7Xi'></small><noframes id='Xt7Xi'>

<tfoot id='Xt7Xi'></tfoot>
  • <legend id='Xt7Xi'><style id='Xt7Xi'><dir id='Xt7Xi'><q id='Xt7Xi'></q></dir></style></legend>
    <i id='Xt7Xi'><tr id='Xt7Xi'><dt id='Xt7Xi'><q id='Xt7Xi'><span id='Xt7Xi'><b id='Xt7Xi'><form id='Xt7Xi'><ins id='Xt7Xi'></ins><ul id='Xt7Xi'></ul><sub id='Xt7Xi'></sub></form><legend id='Xt7Xi'></legend><bdo id='Xt7Xi'><pre id='Xt7Xi'><center id='Xt7Xi'></center></pre></bdo></b><th id='Xt7Xi'></th></span></q></dt></tr></i><div id='Xt7Xi'><tfoot id='Xt7Xi'></tfoot><dl id='Xt7Xi'><fieldset id='Xt7Xi'></fieldset></dl></div>

        • <bdo id='Xt7Xi'></bdo><ul id='Xt7Xi'></ul>

      1. Jacoco eclipse插件和SonarQube中的代码覆盖百分比值不同

        时间:2024-05-09

        1. <i id='20uVh'><tr id='20uVh'><dt id='20uVh'><q id='20uVh'><span id='20uVh'><b id='20uVh'><form id='20uVh'><ins id='20uVh'></ins><ul id='20uVh'></ul><sub id='20uVh'></sub></form><legend id='20uVh'></legend><bdo id='20uVh'><pre id='20uVh'><center id='20uVh'></center></pre></bdo></b><th id='20uVh'></th></span></q></dt></tr></i><div id='20uVh'><tfoot id='20uVh'></tfoot><dl id='20uVh'><fieldset id='20uVh'></fieldset></dl></div>

              <legend id='20uVh'><style id='20uVh'><dir id='20uVh'><q id='20uVh'></q></dir></style></legend>
              <tfoot id='20uVh'></tfoot>
              • <bdo id='20uVh'></bdo><ul id='20uVh'></ul>

                <small id='20uVh'></small><noframes id='20uVh'>

                    <tbody id='20uVh'></tbody>
                  本文介绍了Jacoco eclipse插件和SonarQube中的代码覆盖百分比值不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个 Java 项目.根据 Jacoco eclipse 插件(EclEmma Java Code Coverage 2.3.1.201405111647),该项目的代码覆盖率为 22.3%.我生成 .exec 报告并将其提供给 SonarQube 并使用 sonar runner 运行分析.SonarQube 的 Web 界面上显示的代码覆盖率为 20.2%.包级别的覆盖率值也与 Jacoco 的 eclipse 插件显示的不同.这怎么可能?SonarQube 不是从 Jacoco 生成的 .exec 报告中获取值吗?

                  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 report and feed it to SonarQube and run an analysis with sonar runner. The code coverage shown on SonarQube's web interface as a result is 20.2%. The coverage values at package level are also different to what shown by Jacoco's eclipse plug-in. How is that possible? Isn't SonarQube taking values from the .exec report generated by Jacoco?

                  推荐答案

                  Jacoco 是基于字节码分析的.exec 文件与类文件相结合以获得最终的代码覆盖率值.我的问题是 Eclipse 编译器为 Java 生成的字节码(用于 Jacoco eclipse 插件)和 Javac 生成的字节码(在声纳运行器分析期间)是不同的.因此,两种工具生成的代码覆盖率值不同.

                  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.

                  这篇关于Jacoco eclipse插件和SonarQube中的代码覆盖百分比值不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:用于验证代码的 SonarQube Java 版本 下一篇:声纳添加新项目

                  相关文章

                    1. <tfoot id='M4pSd'></tfoot>
                        <bdo id='M4pSd'></bdo><ul id='M4pSd'></ul>

                      <small id='M4pSd'></small><noframes id='M4pSd'>

                      <legend id='M4pSd'><style id='M4pSd'><dir id='M4pSd'><q id='M4pSd'></q></dir></style></legend>

                      <i id='M4pSd'><tr id='M4pSd'><dt id='M4pSd'><q id='M4pSd'><span id='M4pSd'><b id='M4pSd'><form id='M4pSd'><ins id='M4pSd'></ins><ul id='M4pSd'></ul><sub id='M4pSd'></sub></form><legend id='M4pSd'></legend><bdo id='M4pSd'><pre id='M4pSd'><center id='M4pSd'></center></pre></bdo></b><th id='M4pSd'></th></span></q></dt></tr></i><div id='M4pSd'><tfoot id='M4pSd'></tfoot><dl id='M4pSd'><fieldset id='M4pSd'></fieldset></dl></div>