« Return to Thread: Can Coverage Data be Reset?

Re: Can Coverage Data be Reset?

by Nicholls, Marie :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
John,
 
Thanks so much for your suggestion.  I just tested it out and it worked perfectly.
 
Thanks!
 
Marie


From: John W. Lewis [mailto:JohnW.Lewis@...]
Sent: Thursday, July 03, 2008 1:20 PM
To: John W. Lewis; Nicholls, Marie; cobertura-devel@...
Subject: RE: Can Coverage Data be Reset?

 

Oh.  I see now that my response did not answer your question.

 

See the last section in the faq about writing the data file with a call to saveGlobalProjectData().

 

http://cobertura.sourceforge.net/faq.html

 

So, this scenario would work:

 

1.        <cobertura-instrument>

2.       Copy cobertura.ser file to the web server.

3.       Start the web server.   When it is finished initializing, call saveGlobalProjectData().   Then, copy the cobertura.ser file created by <cobertura-instrument> back to the copy the web server is using.

4.       Start your tests.

 

 

John

 

From: cobertura-devel-bounces@... [mailto:cobertura-devel-bounces@...] On Behalf Of John W. Lewis
Sent: Thursday, July 03, 2008 11:15 AM
To: Nicholls, Marie; cobertura-devel@...
Subject: Re: [Cobertura-devel] Can Coverage Data be Reset?

 

 

The recommendation is to delete the cobertura.ser file before <cobertura-instrument>.   This will destroy any data from previous runs.

 

From: cobertura-devel-bounces@... [mailto:cobertura-devel-bounces@...] On Behalf Of Nicholls, Marie
Sent: Thursday, July 03, 2008 10:56 AM
To: cobertura-devel@...
Subject: [Cobertura-devel] Can Coverage Data be Reset?

 

Hi,

 

I'm running Cobertura against a Weblogic application so after I instrument my classes, I start my server and then run my tests.  During server startup, several classes/methods are executed and that information is captured by Cobertura and displayed on the coverage reports.  I was wondering if there was a way to reset the coverage data before I run my tests so the coverage reports reflect only information related to the tests.  Currently, the reports are not a true representation of the code that is actually covered by our tests.

 

Thanks,

Marie



This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Cobertura-devel mailing list
Cobertura-devel@...
https://lists.sourceforge.net/lists/listinfo/cobertura-devel

 « Return to Thread: Can Coverage Data be Reset?

LightInTheBox - Buy quality products at wholesale price!