« Return to Thread: 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.
« Return to Thread: Can Coverage Data be Reset?
| Free Forum Powered by Nabble | Forum Help |