无法在声纳仪表板中获得有关新代码的报道 [英] Not getting the coverage on new code in sonar dashboard

查看:141
本文介绍了无法在声纳仪表板中获得有关新代码的报道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 scm活动插件1.8 进行清除和 使用 sonar 4.3.3 并在声纳中获得了责备信息,但没有 在仪表板中获取有关新代码的报道

I am trying to use scm activity plugin 1.8 for clearcase and using sonar 4.3.3 and got the blame information in the sonar but did not getting the coverage on new code in dashboard

推荐答案

您应该在构建过程中添加代码覆盖率工具.如果您使用Maven,则可以添加:

You should add Code Coverage Tool to your build process. If you use Maven, then you can add:

<build>
    ...
    <plugins>
        ...
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.7.5.201505241946</version>
            <executions>
                <execution>
                    <id>jacoco-initialize</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <rules>
                    <rule>
                        <element>CLASS</element>
                        <excludes>
                            <exclude>*Test</exclude>
                        </excludes>
                    </rule>
                </rules>
            </configuration>
        </plugin>
    </plugins>
    ...
</build>

这篇关于无法在声纳仪表板中获得有关新代码的报道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆