I have a Maven project with a test case DefaultViewTypeToFragmentMapperTest.java
in the directory /src/test/java/test/com/mycompany/myproduct/android/viewtype2fragmentmapper/
.
I want this test case to be excluded from unit test coverage calculation. In order to achieve this result, I configured the plugin like this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<instrumentation>
<excludes>
<exclude>test/co/**/*.class</exclude>
</excludes>
</instrumentation>
</configuration>
</plugin>
But I still see the aforementioned class in the coverage report.
How can I fix it such that the test case does not appear in the report and its coverage (0 % according to the report) is not taken into account?
mvn site
. If you would like to executemvn cobertura:cobertura
, please configured as a build. Please see my answer at #15134322 for further information. – Neuron<reporting>
node and I use only in scope ofmvn site
. – Slobberymvn cobertura:... -X
– Krever