buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammo van Lessen <tvanles...@gmail.com>
Subject Re: Help with code coverage
Date Tue, 18 Mar 2014 13:42:16 GMT
Hi Vincent,

I remember that I modified a local jacoco task file for that purpose,
perhaps you find that helpful:
https://github.com/apache/ode/blob/master/tasks/jacoco.rake. IIRC it should
merge the data of multiple projects into one report. But we've never used
it intensively, so I'm not entirely sure if it works correctly.

Best,
  Tammo


On Tue, Mar 18, 2014 at 1:57 PM, Vincent Tence <vtence@pyxis-tech.com>wrote:

> Hi Peter,
>
> It would be even better if I can get Jacoco to work instead of emma and
> cobertura.
>
> I have looked at the sources last week but could not figure a way to merge
> the reports of multiple projects into one. Since Jacoco is not mentionned
> in the guide, I thought support was still incomplete.
>
> Can you give me an example of using Jacoco on multiple projects and
> merging reports?
>
> On a side note, anybody has implemented a plugin for integrating with
> coveralls.io?
>
> Thanks,
> -- Vincent
>
>
> On 2014-03-17, at 8:39 PM, Peter Donald <peter@realityforge.org> wrote:
>
> > 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 <vtence@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
>
>


-- 
Tammo van Lessen - http://www.taval.de

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