<tfoot id='im1yG'></tfoot>

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

      将 Spock 的测试与声纳集成

      时间:2024-05-10
    2. <small id='ma5eb'></small><noframes id='ma5eb'>

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

                <tbody id='ma5eb'></tbody>

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

                <tfoot id='ma5eb'></tfoot>

              1. 本文介绍了将 Spock 的测试与声纳集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我使用 spock 编写测试用例,使用 jenkins 运行和发布我的测试用例.我能够得到报告的代码覆盖率,但声纳向我显示仅 Java 单元测试用例;完全没有常规测试用例

                以下 pom.xml 用作参考

                解决方案

                1. 在 Sonar 中安装 Groovy 插件.以管理员/管理员身份登录并转到管理/系统/更新中心选项卡
                2. 在pom文件

                  <sonar.tests>src/test/groovy,src/test/java</sonar.tests>

                如果您这样做,Spock 和 JUnit 测试都会正确显示!见附件截图

                I use spock to write test case and jenkins to run and publish my test cases. I was able to get the code coverage reported but sonar shows me only Java Unit test cases; the groovy test cases are totally missing

                The following pom.xml is used as reference https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter7/spring-standalone-swing/pom.xml

                would anyone please know what I am missing ?

                解决方案

                1. Install the Groovy plugin in Sonar. Login as admin/admin and go to the administration/system/update-center tab
                2. Add the following property in the pom file

                  <sonar.tests>src/test/groovy,src/test/java</sonar.tests>

                If you do this both Spock and JUnit tests are shown correctly! See attached screenshot

                这篇关于将 Spock 的测试与声纳集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如果违反声纳阈值,我如何让 Hudson/Jenkins 失败? 下一篇:SonarQube“找不到类"在主 AST 扫描期间

                相关文章

                1. <small id='E1d9H'></small><noframes id='E1d9H'>

                    <bdo id='E1d9H'></bdo><ul id='E1d9H'></ul>
                  <legend id='E1d9H'><style id='E1d9H'><dir id='E1d9H'><q id='E1d9H'></q></dir></style></legend>

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

                  <tfoot id='E1d9H'></tfoot>