How to exclude classes from coverage calculation in EclEmma without actually excluding them from the coverage itself

I use EclEmma to check the coverage of my test scripts and the use of tests in my project. I have a Base package that contains the most common classes and usage tests. The coverage is as follows:

Code coverage in our project

I want to exclude usage tests (e.g. BugReportTest) from the coverage calculation. But I want the tests inside it to be considered. I know how to exclude the whole class from coverage, but if I do, my coverage of% drops because the actual tests that check which lines of my code are being checked are forgotten. These usage tests should, if necessary, remain in the base package due to privacy.

+4
1

. . .

  • : , . colon (:) wildcard characters (* and ?). (Default: empty)

  • : , . a colon (:) wildcard characters (* and ?). , JaCoCo, , , Java. (Default: sun.reflect.DelegatingClassLoader)

. ! . . .

:


/:

  • <filter includes="com.foo.*" excludes="com.foo.test.*, com.foo.*Test*" />
  • <filter includes="com.foo.*" /> <filter excludes="com.foo.test.*, com.foo.*Test*" />
  • <filter value="+com.foo.*, -com.foo.test.*, -com.foo.*Test*" />
    <filter excludes="com.foo.*Test*" file="myfilters.txt" />
    myfilters.txt :

    -com.foo.test.* +com.foo.*

:


EclEmma

Preferences->Java->Code Coverage "Only path entries matching" src/main/java - ,

+4

All Articles