I am setting up code coverage for a multi-module Java application. The application has integration/functional tests which span across modules. For example, module-service
, module-dao
and module-api
would be exercised by a single functional test.
I have the following requirements:
Report transitive code coverage across all three modules: Tests are present only in
module-service
, but they exercise code in the other two modules as well. I currently use JaCoCo for code coverage because it can calculate this transitive coverage through its run-time instrumentation feature.Filter out unwanted functions (not classes) from coverage: A number of compile-time enhancer tools generate synthetic methods and/or code blocks in the compiled code. This skews coverage considerably for smaller classes.
I've tried Cobertura and Emma (which support only[2]) and JaCoCo (which supports only [1]). Is there a good library which supports both of these objectives?