Emma plugin

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Emma plugin

Adam Purkiss
I am changeing over to use maven to do builds but currently still use ant to fire everything off however I was wondering for my project I run emma through maven so have multiple coverage.xml files. Is there anyway of using the emma plugin to merge these together - or if I was to try cobertura.
 
Failing that given multiple maven modules is there some way I can merge the reports at the parents level?


Internet Explorer 8 makes surfing easier. Get it now!
Reply | Threaded
Open this post in threaded view
|

Re: Emma plugin

Kohsuke Kawaguchi
Administrator

Emma plugin currently doesn't support aggregation of multiple files, but
it should be doable if someone is willing to volunteer.

Alternatively Maybe this is a job better left to do for maven-emma-plugin.

Adam Purkiss wrote:

> I am changeing over to use maven to do builds but currently still use ant to fire everything off however I was wondering for my project I run emma through maven so have multiple coverage.xml files. Is there anyway of using the emma plugin to merge these together - or if I was to try cobertura.
>
>  
>
> Failing that given multiple maven modules is there some way I can merge the reports at the parents level?
>
> _________________________________________________________________
> Internet explorer 8 lets you browse the web faster.
> http://go.microsoft.com/?linkid=9655582
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Emma plugin

davidmc24
In reply to this post by Adam Purkiss
The Cobertura plugin has some support for aggregation of multiple files.

On Tue, Jul 7, 2009 at 11:53 AM, Adam Purkiss<[hidden email]> wrote:

> I am changeing over to use maven to do builds but currently still use ant to
> fire everything off however I was wondering for my project I run emma
> through maven so have multiple coverage.xml files. Is there anyway of using
> the emma plugin to merge these together - or if I was to try cobertura.
>
> Failing that given multiple maven modules is there some way I can merge the
> reports at the parents level?
>
> ________________________________
> Internet Explorer 8 makes surfing easier. Get it now!

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Emma plugin

Adam Purkiss
In reply to this post by Kohsuke Kawaguchi
findbugs does it, junit does it so there must be some way. Of course I would like maven to do it but this is something that is handy soonr rather then later and the Hudson community seems to be faster at cranking this stuff out :). I have noticed that maven plugins seem to be really slow at updateing whenever its something handy :D
 
 
I dont have time right now - but it looks like I may have to make some time as I have to integrate some other stuff anyway, been looking for an excuse to tell management I need to do something like this :)
 

> Date: Wed, 8 Jul 2009 13:55:51 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: Emma plugin
>
>
> Emma plugin currently doesn't support aggregation of multiple files, but
> it should be doable if someone is willing to volunteer.
>
> Alternatively Maybe this is a job better left to do for maven-emma-plugin.
>
> Adam Purkiss wrote:
> > I am changeing over to use maven to do builds but currently still use ant to fire everything off however I was wondering for my project I run emma through maven so have multiple coverage.xml files. Is there anyway of using the emma plugin to merge these together - or if I was to try cobertura.
> >
> >
> >
> > Failing that given multiple maven modules is there some way I can merge the reports at the parents level?
> >
> > _________________________________________________________________
> > Internet explorer 8 lets you browse the web faster.
> > http://go.microsoft.com/?linkid=9655582
> >
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems http://weblogs.java.net/blog/kohsuke/


Attention all humans. We are your photos. Free us.
Reply | Threaded
Open this post in threaded view
|

RE: Emma plugin

Adam Purkiss
In reply to this post by davidmc24
does it? It seemed to suggest that it did not and I am sure I read someone else could not get it to work - or is this a recent feature.... Am I right in thinking that what they need to do is just parse the xml for the total numbers then do some maths and we have the merged total? I have not looked at the code yet.
 

> Date: Wed, 8 Jul 2009 17:29:03 -0400
> From: [hidden email]
> To: [hidden email]
> Subject: Re: Emma plugin
>
> The Cobertura plugin has some support for aggregation of multiple files.
>
> On Tue, Jul 7, 2009 at 11:53 AM, Adam Purkiss<[hidden email]> wrote:
> > I am changeing over to use maven to do builds but currently still use ant to
> > fire everything off however I was wondering for my project I run emma
> > through maven so have multiple coverage.xml files. Is there anyway of using
> > the emma plugin to merge these together - or if I was to try cobertura.
> >
> > Failing that given multiple maven modules is there some way I can merge the
> > reports at the parents level?
> >
> > ________________________________
> > Internet Explorer 8 makes surfing easier. Get it now!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


Windows Live helps you keep up with all your friends, in one place.
Reply | Threaded
Open this post in threaded view
|

Re: Emma plugin

davidmc24
I believe that it aggregates multiple report files, but doesn't
produce an over-all aggregate graph on the project page for maven
projects.  I think that the statistics and so forth on the "coverage
report" page should be accurate, though I could be wrong, as I don't
personally have any Maven projects that I'm currently maintaining
Hudson instances for.

On Wed, Jul 8, 2009 at 6:59 PM, Adam Purkiss<[hidden email]> wrote:

> does it? It seemed to suggest that it did not and I am sure I read someone
> else could not get it to work - or is this a recent feature.... Am I right
> in thinking that what they need to do is just parse the xml for the total
> numbers then do some maths and we have the merged total? I have not looked
> at the code yet.
>
>> Date: Wed, 8 Jul 2009 17:29:03 -0400
>> From: [hidden email]
>> To: [hidden email]
>> Subject: Re: Emma plugin
>>
>> The Cobertura plugin has some support for aggregation of multiple files.
>>
>> On Tue, Jul 7, 2009 at 11:53 AM, Adam Purkiss<[hidden email]>
>> wrote:
>> > I am changeing over to use maven to do builds but currently still use
>> > ant to
>> > fire everything off however I was wondering for my project I run emma
>> > through maven so have multiple coverage.xml files. Is there anyway of
>> > using
>> > the emma plugin to merge these together - or if I was to try cobertura.
>> >
>> > Failing that given multiple maven modules is there some way I can merge
>> > the
>> > reports at the parents level?
>> >
>> > ________________________________
>> > Internet Explorer 8 makes surfing easier. Get it now!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ________________________________
> Windows Live helps you keep up with all your friends, in one place.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Emma plugin

Adam Purkiss
fair enough.... rght now all I do is actually launch maven from an ant file at the parent module level so all I really want to do is point emma/cobertura plugins to more then one xml file that they merge into one graph just like junit tests and findbugs for a freestyle project
 
I still need to do other things in the build before and after maven and as this is a gradual switch over this is the easiest way to do it for me.
 

> Date: Wed, 8 Jul 2009 20:32:36 -0400
> From: [hidden email]
> To: [hidden email]
> Subject: Re: Emma plugin
>
> I believe that it aggregates multiple report files, but doesn't
> produce an over-all aggregate graph on the project page for maven
> projects. I think that the statistics and so forth on the "coverage
> report" page should be accurate, though I could be wrong, as I don't
> personally have any Maven projects that I'm currently maintaining
> Hudson instances for.
>
> On Wed, Jul 8, 2009 at 6:59 PM, Adam Purkiss<[hidden email]> wrote:
> > does it? It seemed to suggest that it did not and I am sure I read someone
> > else could not get it to work - or is this a recent feature.... Am I right
> > in thinking that what they need to do is just parse the xml for the total
> > numbers then do some maths and we have the merged total? I have not looked
> > at the code yet.
> >
> >> Date: Wed, 8 Jul 2009 17:29:03 -0400
> >> From: [hidden email]
> >> To: [hidden email]
> >> Subject: Re: Emma plugin
> >>
> >> The Cobertura plugin has some support for aggregation of multiple files.
> >>
> >> On Tue, Jul 7, 2009 at 11:53 AM, Adam Purkiss<[hidden email]>
> >> wrote:
> >> > I am changeing over to use maven to do builds but currently still use
> >> > ant to
> >> > fire everything off however I was wondering for my project I run emma
> >> > through maven so have multiple coverage.xml files. Is there anyway of
> >> > using
> >> > the emma plugin to merge these together - or if I was to try cobertura.
> >> >
> >> > Failing that given multiple maven modules is there some way I can merge
> >> > the
> >> > reports at the parents level?
> >> >
> >> > ________________________________
> >> > Internet Explorer 8 makes surfing easier. Get it now!
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >
> > ________________________________
> > Windows Live helps you keep up with all your friends, in one place.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


Create a cool, new character for your Windows Live™ Messenger. Check it out
Reply | Threaded
Open this post in threaded view
|

Re: Emma plugin

stephenconnolly
In reply to this post by Adam Purkiss
Ha! If only it was that easy...

Q: if one module covers Foo.doBar() 43% and another covers Foo.doBar() 43%, then what is the total coveage of Foo.doBar()?

A: I don't know it can be anything between 43% and 86%

You need the line-level coverage of both methods to answer this question...

So now you need to build a model of _every_ file line by line and merge in the results from each coverage file... oh and do the same for conditional executions at the same time... oh and who cares if you have 10million lines of code in total...

BTW, if you have access to the .class information, this problem is somewhat simpler, because you know where the branch points are and you can compress the file model... you don't need to record coverage for comment lines, etc.

emma, clover and cobertura do a very good job of aggregating all this information... but it's not easy to do when you are not the one collecting the coverage information (i.e. a hudson plugin)

-Stephen

2009/7/8 Adam Purkiss <[hidden email]>
does it? It seemed to suggest that it did not and I am sure I read someone else could not get it to work - or is this a recent feature.... Am I right in thinking that what they need to do is just parse the xml for the total numbers then do some maths and we have the merged total? I have not looked at the code yet.
 
> Date: Wed, 8 Jul 2009 17:29:03 -0400
> From: [hidden email]

> To: [hidden email]
> Subject: Re: Emma plugin
>
> The Cobertura plugin has some support for aggregation of multiple files.
>
> On Tue, Jul 7, 2009 at 11:53 AM, Adam Purkiss<[hidden email]> wrote:
> > I am changeing over to use maven to do builds but currently still use ant to
> > fire everything off however I was wondering for my project I run emma
> > through maven so have multiple coverage.xml files. Is there anyway of using
> > the emma plugin to merge these together - or if I was to try cobertura.
> >
> > Failing that given multiple maven modules is there some way I can merge the
> > reports at the parents level?
> >
> > ________________________________
> > Internet Explorer 8 makes surfing easier. Get it now!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


Windows Live helps you keep up with all your friends, in one place.

Reply | Threaded
Open this post in threaded view
|

RE: Emma plugin

Adam Purkiss
Maybe its just my projects but the way I see them running emma is that module A runs its tests and you get result X and module B runs its tests and you get result Y and they dont intersect. 
 
 
Now if B depends on A does it actually insturment the dependancy or just the modules code. If it is the former then you will get that problem, if it is the later then you wont suffer that, however saying that it does mean that your tests need to be tightly coupled to the code instrmented inorder for code coverage to be correct... oh man its a nasty little mess so yes I guess it is better the maven modules deal with it :) Anyone got any idea on when they will? I notice some modules like checkstyle are so behind its not funny
 

Date: Thu, 9 Jul 2009 07:36:41 +0100
From: [hidden email]
To: [hidden email]
Subject: Re: Emma plugin

Ha! If only it was that easy...

Q: if one module covers Foo.doBar() 43% and another covers Foo.doBar() 43%, then what is the total coveage of Foo.doBar()?

A: I don't know it can be anything between 43% and 86%

You need the line-level coverage of both methods to answer this question...

So now you need to build a model of _every_ file line by line and merge in the results from each coverage file... oh and do the same for conditional executions at the same time... oh and who cares if you have 10million lines of code in total...

BTW, if you have access to the .class information, this problem is somewhat simpler, because you know where the branch points are and you can compress the file model... you don't need to record coverage for comment lines, etc.

emma, clover and cobertura do a very good job of aggregating all this information... but it's not easy to do when you are not the one collecting the coverage information (i.e. a hudson plugin)

-Stephen

2009/7/8 Adam Purkiss <[hidden email]>
does it? It seemed to suggest that it did not and I am sure I read someone else could not get it to work - or is this a recent feature.... Am I right in thinking that what they need to do is just parse the xml for the total numbers then do some maths and we have the merged total? I have not looked at the code yet.
 
> Date: Wed, 8 Jul 2009 17:29:03 -0400
> From: [hidden email]

> To: [hidden email]
> Subject: Re: Emma plugin
>
> The Cobertura plugin has some support for aggregation of multiple files.

>
> On Tue, Jul 7, 2009 at 11:53 AM, Adam Purkiss<[hidden email]> wrote:
> > I am changeing over to use maven to do builds but currently still use ant to
> > fire everything off however I was wondering for my project I run emma
> > through maven so have multiple coverage.xml files. Is there anyway of using
> > the emma plugin to merge these together - or if I was to try cobertura.
> >
> > Failing that given multiple maven modules is there some way I can merge the
> > reports at the parents level?
> >
> > ________________________________
> > Internet Explorer 8 makes surfing easier. Get it now!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


Windows Live helps you keep up with all your friends, in one place.



Internet Explorer 8 makes surfing easier. Get it now!
Reply | Threaded
Open this post in threaded view
|

Newbie question

Knuplesch, Juergen
Hello,
 
did I get it right, that hudson checks out (updates) my CVS projects in the workspace.
 
Therefore my Build task should not do this himself again.
The trick is to use the checkout from Hudson and configure it, so that my ANT-task gets the dir right.
 
Do I have properties to send to my ANT task like workspacedir etc.
 
Greetings from germany
 
 

--
Jürgen Knuplesch

Reply | Threaded
Open this post in threaded view
|

Re: Newbie question

Sami Tikka
2009/7/9 Knuplesch, Juergen <[hidden email]>:
> did I get it right, that hudson checks out (updates) my CVS projects in the
> workspace.

Yes.

> Therefore my Build task should not do this himself again.

That is correct.

> Do I have properties to send to my ANT task like workspacedir etc.

Hudson provides some environment variables for the build tasks. See
http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project#Buildingasoftwareproject-below

-- Sami

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]