From: Jeremy R. T. <je...@th...> - 2005-03-10 01:10:24
|
Brian, can you give a few more details about your setup? I use a Spring/Ant mix for all of our unit tests so that each has access to the application context. I might be able to help with a few mroe details. Jeremy Thomerson ----- Original Message ----- From: "Brian Doyle" <bri...@ya...> To: "Mark Doliner" <Mar...@sa...>; <Cob...@li...> Sent: Wednesday, March 09, 2005 5:14 PM Subject: [SPAM-LOW] RE: [Cobertura-devel] 0% code coverage > I just copied the instrumented classes to the pre-instrumented > directory and it still fails with the same message :( If I copy the > non-instrumented classes back, it runs but I'm back to 0% coverage. > I'll try out Clover or EMMA and see if it's just something basic I'm > doing wrong here. Thanks for your help! > > --- Mark Doliner <Mar...@sa...> wrote: > > > The package names and class names should remain the same. It > > SOUNDS like Spring isn't looking for classes in the "instrumented" > > directory. You could try moving/copying these files to where the > > pre-instrumented classes were. (That's probably not an ideal > > long-term solution, but it might help narrow down the problem.) > > -Mark > > > > > -----Original Message----- > > > From: cob...@li... > > > [mailto:cob...@li...] On > > > Behalf Of Brian Doyle > > > Sent: Wednesday, March 09, 2005 4:05 PM > > > To: Cob...@li... > > > Subject: RE: [Cobertura-devel] 0% code coverage > > > > > > Thanks for the suggestions! I'm made some progress but still > > not > > > quite working for me. When I removed the original classes and > > run > > > the unit tests I get a NoClassDefFoundError for any of the > > production > > > classes. I am using Spring which loads the files up by > > specifying > > > the full package and name of the applicationContext.xml. Spring > > is > > > actually throwing the NoClassDefFoundError itself and can't seem > > to > > > find the file. The file actually exists in the instrumented > > > directory. I was wondering when the class does get instrumented > > does > > > it change the package name or name of the class when it's running > > in > > > the JVM. If that is the case that would explain why Spring can't > > > find the class to load. Thanks! > > > > > > --- Mark Doliner <Mar...@sa...> wrote: > > > > It sounds like you have a pretty good understanding of what > > should > > > > be happening. I'm not actually sure if the file size of > > > > cobertura.ser should grow... I can't think of why it would, but > > > > from experience I think it does. The time stamp on the file > > would > > > > definitely be changed. You could try removing the original > > classes > > > > before running the tests, to be absolutely sure you're using > > the > > > > instrumented classes. > > > > > > > > The cobertura.ser file is generally only written when the JVM > > > > exists. I suppose it's possible that you run your tests, and > > then > > > > the ser file is written, then maybe you run another test in a > > new > > > > JVM and it overwrites the ser file. (That's something I'd like > > to > > > > see fixed sometime, maybe for the next version.) > > > > -Mark > > > > > > > > > > > > > -----Original Message----- > > > > > From: cob...@li... > > > > > [mailto:cob...@li...] On > > > > > Behalf Of Brian Doyle > > > > > Sent: Wednesday, March 09, 2005 12:57 PM > > > > > To: Cob...@li... > > > > > Subject: [Cobertura-devel] 0% code coverage > > > > > > > > > > I'm attempting to use Cobertura for the first time and the > > report > > > > > shows up as 0% coverage even though I have unit tests. I > > assume > > > > > that the cobertura.ser file is suppose to grow as the unit > > test > > > > are > > > > > running? That file is created and it never changes in size. > > The > > > > ant > > > > > build is always in the same directory, running, compiling and > > > > > creating reports and there's only one of those cobertura.ser > > > > files. > > > > > Also the classpath for the unit tests has the instrumented > > > > classes as > > > > > the first thing in the path. The instrumented classes is > > > > populated > > > > > with classes. Not sure what else to check here. Any ideas? > > > > Thanks. > > > > > > > > > > > > > > > Brian Doyle > > > > > > > > > > > > ------------------------------------------------------- > > > > SF email is sponsored by - The IT Product Guide > > > > Read honest & candid reviews on hundreds of IT Products from > > real > > > > users. > > > > Discover which products truly live up to the hype. Start > > reading > > > > now. > > > > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > > > > _______________________________________________ > > > > Cobertura-devel mailing list > > > > Cob...@li... > > > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > > > > > > Brian Doyle > > > > > > I don't know about ignorance, and I don't care about apathy, > > > but I simply will not put up with intolerance! - Unknown > > > > > > > > > ------------------------------------------------------- > > > SF email is sponsored by - The IT Product Guide > > > Read honest & candid reviews on hundreds of IT Products from > > > real users. > > > Discover which products truly live up to the hype. Start reading > > now. > > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > > _______________________________________________ > > > Cobertura-devel mailing list > > > Cob...@li... > > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real > > users. > > Discover which products truly live up to the hype. Start reading > > now. > > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > Brian Doyle > > I don't know about ignorance, and I don't care about apathy, but I simply will not put up with intolerance! - Unknown > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel |