Hi, Sorry I missed this. Did anyone get back to you?
We have moved away from both emma and cobertura to jacoco for various reasons (mostly due to moving to Java 7) and have no problem merging in data from multiple projects. I had a look on the website and there does not seem to be any decent documentation for the addon but you can see the source at [1]. We generate multiple cov files (one for each project) and then have jenkins merge them into one report. I am not sure if that helps? [1] https://github.com/apache/buildr/blob/master/addon/buildr/jacoco.rb On Wed, Mar 12, 2014 at 6:37 AM, Vincent Tence <vte...@pyxis-tech.com> wrote: > Hey guys, > > I have a project composed of several sub-projects for which I'd like to > measure code coverage. I'm having trouble getting a top-level coverage report > that aggregates coverage for all sub-projects and at the same time let me > drill down the results. > > I'm using Buildr 1.4.12. My project is composed of 3 sub-projects with unit > tests and a 4th one that runs integration tests (see build file > https://github.com/testinfected/simple-petstore/blob/master/buildfile) > > I'm not having any success with cobertura. If I run: > > buildr test cobertura:html > > it generates an report with only classes from the server sub-project (the one > with the integration tests), and coverage is 0% (expected, since these 3 > classes are covered at integration level). > > If I add to my buildfile: > > cobertura.include 'org.testinfected.==*==' > > I finally get coverage for all classes, but still without the coverage from > integration tests. So it's incomplete. > > If I try running: > > buildr test integration cobertura:html > > report generation fails and cobertura complains that there is no top level > reports directory. > > On top of that, I have to require the cobertura plugin in my buildfile, since > running: > > buildr -rbuildr/java/cobertura test cobertura:html > > fails with: > > RuntimeError : Internal error: attempting to access local setting before > buildfile located > > With Emma, it's a lot better. It works almost flawlessly running: > > buildr -rbuildr/java/emma package emma:html > > I get the top level report with aggregates of the sub-projects, but I cannot > drill down into the report. The top level report references html pages that > are not found in the top level report dir. > > If I want the details, I have to generate individual sub-projects reports, > e.g. > > buildr -rbuildr/java/emma package petstore:domain:emma:html > > and look into the sub-projects individually. > > Does anybody know how to get a top level report with Emma that support > drilling down with data from sub-projects? > > Any idea why I'm having no luck with the cobertura plugin? > > Thanks a lot, > -- Vincent > -- Cheers, Peter Donald