From: Steve C. <sch...@gm...> - 2012-07-13 10:17:00
|
It is not required because if the file does not exist, it will create a new cobertura.ser file with the coverage results in there. Yes, if you run the cobertura-merge tool you should be able to merge both results without issues. It is only recommend so you don't have that extra step at the end of merging. On Fri, Jul 13, 2012 at 3:23 AM, Zschocke, Florian <Flo...@cy...> wrote: > Hi! > > I have a question about the cobertura.ser file. Is this file needed while running the tests and collection data? I know a new file is written after the test run when none was present, but is it of any advantage if the file is present while the tests run? > > >From the code I gathered that it doesn't matter if the cobertura.ser file is present. The only place I found where it is read during collecting stats is at the end when the final data is written at shutdown. There prior contents get merged with the new data collected. I didn't find anything in the code that hints at the data collection profiting from information added to the file during instrumentation. The instrumented code seems to be pretty self contained. > > I am asking because I am trying to run Cobertura instrumented code in an OSGi container and later merging the resulting cobertura.ser file with the one created by instrumentation. I understand that you need the data file from instrumentation in order to get actual coverage data, so that I don't end up with 100% coverage. I am just trying to find out if I can safely merge the separately created collection and instrumentation cobertura.ser files and end up with correct data. I am unsure because sometimes I end up with proper line coverage but 0% branch coverage, which is wrong. > > Thanks, > Florian > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel |