From: Steven C. <ste...@re...> - 2010-12-29 22:10:57
|
I'm sorry, I finally figured out my answer. The problem is that a windows service starts in c:\windows\system32, which is where conhost.exe is located (that's the executable that starts a windows service). The cobertura.ser file was located in this folder and I didn't notice that, so every time I was doing a flush, or even stopping the service, it was always reporting successfully, just in a location I did not expect. Thanks again, Steve On 12/29/2010 1:38 PM, John W. Lewis wrote: > There is another way that is used for webapps. There is a coberturaFlush.war file that can be loaded by a web server. Then, a URL can be retrieved that will cause a flush. > > The bottom line is that the process that runs the test either has to do the flush, or it has to listen for a flush request. Cobertura does not listen for a request at the moment. > > John > > > -----Original Message----- > From: Steven Christou [mailto:ste...@re...] > Sent: Wednesday, December 29, 2010 11:28 AM > To: John W. Lewis > Cc: cob...@li... > Subject: Re: [Cobertura-devel] Invoking Cobertura to report in source code > > Is there absolutely no other way to force a dump without making modification to my code. I would try if all possible to avoid making modifications like this to my code. The timer that saves data sounds very interesting, or might be what I'm looking for, although the patch still is open which leads me to believe that there is still work to be done with it. > Thanks. > > On 12/28/2010 2:51 PM, John W. Lewis wrote: >> The FAQ tells how you can dump the data before shutdown. >> >> -----Original Message----- >> From: Steven Christou [mailto:ste...@re...] >> Sent: Tuesday, December 28, 2010 2:50 PM >> To: John W. Lewis >> Cc: cob...@li... >> Subject: Re: [Cobertura-devel] Invoking Cobertura to report in source >> code >> >> I was thinking about a possible solution to this. I was wondering if it would be possible to write like a "flush" .bat file. When this .bat file is called, it will do an automatic flush of all the data, rather than expecting shutdown hooks to execute. If you run an application as a windows service, it will fail to execute any shutdown hooks(that's what's been happening with me at least). Either this, or right before a report file is generated it could do a flush of all the data, to make sure all the data is gathered. I might be talking over my head on this one but this is what I was thinking when instrumented items run currently: >> >> run application -> cobertura starts writing to .class files -> >> shutdown hook executes -> .class file writes to .ser file -> done >> >> >> On 7/7/2010 9:31 AM, John W. Lewis wrote: >>> Please see the last question in the FAQ. >>> >>> http://cobertura.sourceforge.net/faq.html >>> >>> >>> >>> -----Original Message----- >>> From: Steven Christou [mailto:ste...@re...] >>> Sent: Wednesday, July 07, 2010 9:51 AM >>> To: cob...@li... >>> Subject: [Cobertura-devel] Invoking Cobertura to report in source >>> code >>> >>> Hello, >>> In the product I am working on, we are doing a Process.destroy() >>> which essentially destroys the JVM and does not allow for shutdown >>> hooks to be ran. Since no shutdown hooks can be ran, cobertura fails >>> to run and produce the results we want. I was wondering if there was >>> a way we could have it produce results right before we do the call to >>> the Process.destroy()? >>> Thanks! >>> Email Disclaimer: >>> http://www.redprairie.com/emaildisclaimer/ >>> >>> >>> --------------------------------------------------------------------- >>> --------- This SF.net email is sponsored by Sprint What will you do >>> first with EVO, the first 4G phone? >>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >>> _______________________________________________ >>> Cobertura-devel mailing list >>> Cob...@li... >>> https://lists.sourceforge.net/lists/listinfo/cobertura-devel >>> >> Email Disclaimer: >> http://www.redprairie.com/emaildisclaimer/ >> >> >> > Email Disclaimer: > http://www.redprairie.com/emaildisclaimer/ > > > Email Disclaimer: http://www.redprairie.com/emaildisclaimer/ |