TAM FDQ2 - 2010-04-07

In my project I'm having multiple modules and their EMMA coverage report generation targets in place which are working fine. My requirement is to generate am EMMA report which should indicate cross module code coverage.

For example, lets say I have two module A and B with module B dependent on A. Hence, JUnit test cases written in B are also covering classes residing in module A (I'm including jar of A in the classpath). Now following are the approaches I've already tried:

1) Running test cases in both modules separately, then collecting coverage.ec and coverage.em of both the module to generate report in module B: this generates a single report but with coverage of individual modules. That is, the report is nothing more than a merging of two separate reports.

2) Clubbing together source code, source class files and test class files of both the modules, then executing test target for module B: this generates coverage.em having data of both the modules along with a single report but this time only coverage of module B is reflected. All the packages of module A are shown with 0% coverage. Please note that I have also modified this approach by running some test cases of module A in the test target of B itself but the result is same. In fact, if I do not include any test case from module B, then no coverage.ec is generated.

If anyone have done such thing in past or have any suggestion then please reply at the earliest. Thanks in advance.