A workaround that I have often used for this is to place the Cobertura plugin into a Profile. Then, I only run the coverage tests when I care to see coverage. I don't usually care about coverage for every single build. So, you only see the normal unit tests as a developer, unless you specifically ask for it.

Dave


On 06/28/2011 12:55 PM, Mark Struberg wrote:
Hi Roland!


Imo Emma should behave the same.

cobertura and emma (imo too) fork a separate maven lifecycle which basically 
runs all the test phases again + adds an class instrumentation phase.

Imagine that you would e.g. also get the instrumented classes if you build a 
test.jar and not do this in a separate lifecycle...

LieGrue,
strub

--- On Tue, 6/28/11, Collins, Russell<[email protected]>  wrote:

From: Collins, Russell<[email protected]>
Subject: Re: [mojo-user] Cobertura Maven Plugin
To: "[email protected]"<[email protected]>
Cc: "[email protected]"<[email protected]>, 
"[email protected]"<[email protected]>
Date: Tuesday, June 28, 2011, 4:31 PM








The Emma plug-in does not seem to do this "double testing".  At least, the output is not 
showing tests being run twice.  Does Emma have this "problem" also?



When I run the site plug-in, the index.html file for Emma is blank.  When will 
this be corrected?

























-----Original Message-----

From: Mark Struberg<[email protected]>

Reply-to: Mark Struberg<[email protected]>

To: [email protected]<[email protected]>, [email protected]

Cc: [email protected]<[email protected]>

Subject: Re: [mojo-user] Cobertura Maven Plugin

Date: Tue, 28 Jun 2011 17:24:47 +0100



Just to clarify that because many people get this wrong.

Not the cobertura-maven-plugin is running the tests twice, but maven 
INTENTIONALLY first runs the tests un-instrumented, and only after that uses 
bytecode enhancements on the class to get code coverage numbers.

The reason for this is that the class instrumentation sometimes leads to test 
errors and would lead to people searching for hours for phantom errors.


LieGrue,
strub


--- On Tue, 6/28/11, Collins, Russell<[email protected]>  wrote:

From: Collins, Russell<[email protected]>
Subject: Re: [mojo-user] Cobertura Maven Plugin
To: "[email protected]"<[email protected]>
Cc: "[email protected]"<[email protected]>
Date: Tuesday, June 28, 2011, 4:09 PM








Thank you for letting me know that.

























-----Original Message-----

From: Asmann, Roland<[email protected]>

Reply-to: "Asmann, Roland"<[email protected]>

To: [email protected]<[email protected]>

Cc: Collins, Russell<[email protected]>

Subject: Re: [mojo-user] Cobertura Maven Plugin

Date: Tue, 28 Jun 2011 17:56:15 +0200



You can't...

Only solution I see is to NOT use the plugin, but add Cobertura using
the Ant-tasks...


On 28.06.2011 17:51, Collins, Russell wrote:
I am trying to use this plugin but it keeps running the tests twice. I
do not want to run the tests twice. How do I turn this off?

Russell Collins
******************************************************************************************

This message may contain confidential or proprietary information
intended only for the use of the
addressee(s) named above or may contain information that is legally
privileged. If you are
not the intended addressee, or the person responsible for delivering it
to the intended addressee,
you are hereby notified that reading, disseminating, distributing or
copying this message is strictly
prohibited. If you have received this message by mistake, please
immediately notify us by
replying to the message and delete the original message and any copies
immediately thereafter.

Thank you.
******************************************************************************************

CLLD

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to