How to ignore scanning of specific classes using EclEmma and Eclipse?

I am using EclEmma (inside Eclipse) to scan my JUnit code coverage. This works correctly - however, I do not want EclEmma to scan my folder src/view, as it contains Swing code, which I consider undeserving of testing.

Is it possible to ignore this folder when starting EclEmma so that it: a) runs faster and b) does not distort the percentage of coverage?

EDIT:

My project structure:

src/view
src/model
src/controller

I tried these (possibly others) using the “Path Entries” section of the “Settings” page:

"src/view"
"src/view/*"
"view"
"view/*"
src/view

They use the Exceptions section of the Settings page:

*
*View*
*View*.class
src/view/*View*
src/view/*View*.class

They all leave me with the same result of analyzing my entire src folder.

+5
source
3

exclude:

: , . (:) (* ?). ( : )

, , :

: , . , . (. "src/main/java", : )

eclemma - , src.

,

. () .

+5

[] , , : https://github.com/jacoco/eclemma/issues/70

, eclemma : . , .

your.classes.here. *, , , , , , .

. , , , . , , 0%, .

, . , .

+6

EclEmma, ​​ , , , - , - .

  • To exclude classes from the test, I name all my test classes as * Case.java, and then enable or exclude them through SuiteClasses. You can learn more about this at https://github.com/junit-team/junit4/wiki/Aggregating-tests-in-suites
  • To measure coverage, I use Maven and Cobertura. This will only check the files specified in my test suites and generate coverage reports accordingly.
+1
source

All Articles