I have a multi-module Maven setup with Java code.
My unit tests, in one of the modules, exercise code in multiple modules. Naturally, the modules have inter-dependencies, and code in all relevant modules is compiled as needed in advance of test execution.
So: How can I get a report on the coverage of the entire codebase?
Note: I am not asking how to combine the results of coverage for tests in multiple modules. I am asking how to get coverage for tests in a single module using instrumented code from multiple modules. Anyone interested in the former might refer to these other questions, and the recommendations by Crowne for Maven Dashboard and Sonar.
I succeeded in getting a full coverage report using pure Ant. [EDIT:] I instrumented all jars from the development-runtime directory into a temporary directory; prepended the temporary directory to the classpath; then ran tests from Ant with batch-test.
Ant can be run from Maven, but the challenge here is seamless integration (i.e., feeding all the classpath and sourcepath elements from Maven to Ant automatically), which is why I did not use Maven's facilities for this purpose.
There are also other questions about integration tests. However, by default, each project's report by default only reports coverage on code in the same project, whereas my tests exercise code in multiple projects.
This article in Spanish might be relevant. Here is another Seam-specific article.