buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Tence <>
Subject Help with code coverage
Date Tue, 11 Mar 2014 19:37:26 GMT
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

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message