From: Zschocke, F. <Flo...@cy...> - 2012-07-27 17:15:21
|
-----Original Message----- From: Eyal Edri [mailto:ee...@re...] ----- Original Message ----- > From: "Florian Zschocke" <Flo...@cy...> > Sent: Sunday, July 22, 2012 11:36:01 PM > > Plus, if you run the report only on the created cobertua.ser file, you > will get a code coverage of 100%. That is because only information for > the touched lines and branches will be in the file. > To get correct code coverage you need the information from the rest of > the sources, too. So you will need to merge the cobertura.ser file > created on your deployment server with the cobertura.ser file created > during instrumentation of the code. > > Be aware that Cobertura seems to have a bug when merging cobertura.ser > files. The order in which you merge the files appears to matter. This is interesting, can you please elaborate? i'm running multiple testing jobs (in devel more, i.e i compile the sources), each job creates a cobertura.ser file. once all jobs finish, i run a merge job that merges all cobertura.ser files. how do i know what is the correct order or merge to use in order to get the right results? You don't. At least I don't. I just made the experience that merging in different orders gives different results. This looks like a bug to me. I have worked around it now by making sure that one and the same cobertura.ser file is used for instrumentation of all classes and for all tests run. Best regards, Florian |