|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
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 |
|
|
Re: Can Coverage Data be Reset?You might consider making the .ser file
read-only from after instrumentation until running your tests, or otherwise
finding a way to get file created just from instrumentation restored right
before running the tests. From:
cobertura-devel-bounces@...
[mailto:cobertura-devel-bounces@...] On Behalf Of Nicholls, Marie 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
------------------------------------------------------------------------- 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 |
|
|
Re: 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 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
------------------------------------------------------------------------- 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 |
|
|
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 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 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
------------------------------------------------------------------------- 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 |
|
|
Re: Can Coverage Data be Reset?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 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 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
------------------------------------------------------------------------- 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 |
|
|
Re: Can Coverage Data be Reset?That is great to hear! I just realized my step #2 is not actually necessary – the first
copy of cobertura.ser is not needed, but that is probably not a big deal. John From: Nicholls, Marie
[mailto:Marie.Nicholls@...] 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@...] 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 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 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
------------------------------------------------------------------------- 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 |
|
|
Re: Can Coverage Data be Reset?Adam,
I really thought the read-only idea would work but the
startup info was still there.
Anyway, I followed your second idea which John Lewis
also suggested and it worked perfectly. I think John's instructions to
call saveGlobalProjectData() was a key piece to
getting the startup info removed.
Thank you both.
Marie From: Wilkinson, Adam [mailto:adam.wilkinson@...] Sent: Thursday, July 03, 2008 11:12 AM To: Nicholls, Marie; cobertura-devel@... Subject: RE: [Cobertura-devel] Can Coverage Data be Reset? You might consider
making the .ser file read-only from after instrumentation until running your
tests, or otherwise finding a way to get file created just from instrumentation
restored right before running the tests. From:
cobertura-devel-bounces@...
[mailto:cobertura-devel-bounces@...] On Behalf Of Nicholls, Marie 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
------------------------------------------------------------------------- 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 |
|
|
Re: Can Coverage Data be Reset?Yeah, calling saveGlobalProjectData() is the only way to get
Cobertura to flush the counts it has in memory. From:
cobertura-devel-bounces@...
[mailto:cobertura-devel-bounces@...] On Behalf Of Nicholls,
Marie Adam, I really thought the read-only idea would work but the startup
info was still there. Anyway, I followed your second idea which John Lewis also suggested
and it worked perfectly. I think John's instructions to call
saveGlobalProjectData() was a key piece to getting the startup info removed. Thank you both. Marie From: Wilkinson, Adam
[mailto:adam.wilkinson@...] You might consider making the .ser file read-only from after
instrumentation until running your tests, or otherwise finding a way to get
file created just from instrumentation restored right before running the tests. From:
cobertura-devel-bounces@...
[mailto:cobertura-devel-bounces@...] On Behalf Of Nicholls,
Marie 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
------------------------------------------------------------------------- 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 |
|
|
Re: Can Coverage Data be Reset?John,
I actually think having a copy of the original
cobertura.ser was important in starting fresh once my tests started.
Otherwise, wouldn't the report include the startup info? Doesn't calling
the saveGlobablProjectData() just flush the data sooner to the .ser file but the
.ser file still maintains all the info??
Thanks,
Marie
From: John W. Lewis
[mailto:JohnW.Lewis@...]
Sent: Thursday, July 03, 2008 2:49 PM To: Nicholls, Marie; cobertura-devel@... Subject: RE: Can Coverage Data be Reset? That
is great to hear! I
just realized my step #2 is not actually necessary – the first copy of
cobertura.ser is not needed, but that is probably not a big
deal. John From: Nicholls, Marie
[mailto:Marie.Nicholls@...] 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@...] 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 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 |