cobertura不显示所有结果

时间:2018-06-14 12:25:09

标签: cobertura maven-cobertura-plugin

Unable to get proper codecoverage report in either of the cases.

1. when maven project is build with mvn cobertura:cobertura then cobertura is able to show coverage percentage but few packages are not shown in results.

2. Added below maven plugin and build the project, now it displays all packages but test coverage percentage is 0.

<pre>
 <plugin>
        <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <argLine>-XX:-UseSplitVerifier</argLine>
                <formats>
                    <format>xml</format>
                </formats>
            </configuration>
            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>cobertura</goal>
                    </goals>
                </execution>
            </executions>
       </plugin>
</pre>

我尝试运行的所有测试用例都是使用Mockito编写的,所有测试方法都以名称测试为前缀。

请帮忙

0 个答案:

没有答案
相关问题