Need to exclude accessors and certain filename patterns from coverage

26 views
Skip to first unread message

Michael Bailey

unread,
Dec 11, 2016, 4:41:27 PM12/11/16
to JaCoCo and EclEmma Users
In order to make our code coverage statistics more accurate, we'd like to exclude accessors (at least) and certain source filename patterns (if possible) from code coverage statistics. We could implement runners to auto-test accessors, but this would be more work and would result in skewed coverage numbers on the business logic cases in our codebase.

I've poked around on the web, and it's very unclear if this is implemented in Jacoco yet, or if it's still being discussed, or if development on this feature is dead. Other coverage tools such as Cobertura support this feature - how can I do in Jacoco? I'd rather have our existing tool work than spend a lot of time migrating over to another framework.

Thanks for your help!
Michael

Evgeny Mandrikov

unread,
Dec 12, 2016, 5:01:28 PM12/12/16
to JaCoCo and EclEmma Users
You can exclude files from report. For example in case of Maven - http://www.eclemma.org/jacoco/trunk/doc/report-mojo.html#excludes
Exclusion of accessors is not implemented.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages