You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(66) |
Apr
(29) |
May
(85) |
Jun
(66) |
Jul
(24) |
Aug
(139) |
Sep
(72) |
Oct
(26) |
Nov
(142) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(55) |
Feb
(72) |
Mar
(43) |
Apr
(60) |
May
(95) |
Jun
(22) |
Jul
(48) |
Aug
(17) |
Sep
(54) |
Oct
(30) |
Nov
(82) |
Dec
(17) |
2007 |
Jan
(23) |
Feb
(38) |
Mar
(46) |
Apr
(12) |
May
(77) |
Jun
(77) |
Jul
(94) |
Aug
(51) |
Sep
(38) |
Oct
(57) |
Nov
(39) |
Dec
(67) |
2008 |
Jan
(38) |
Feb
(56) |
Mar
(42) |
Apr
(46) |
May
(37) |
Jun
(43) |
Jul
(52) |
Aug
(22) |
Sep
(22) |
Oct
(34) |
Nov
(37) |
Dec
(29) |
2009 |
Jan
(27) |
Feb
(35) |
Mar
(67) |
Apr
(37) |
May
(31) |
Jun
(79) |
Jul
(71) |
Aug
(59) |
Sep
(31) |
Oct
(47) |
Nov
(36) |
Dec
(7) |
2010 |
Jan
(15) |
Feb
(87) |
Mar
(38) |
Apr
(33) |
May
(24) |
Jun
(47) |
Jul
(26) |
Aug
(28) |
Sep
(33) |
Oct
(13) |
Nov
(8) |
Dec
(36) |
2011 |
Jan
(32) |
Feb
(10) |
Mar
(29) |
Apr
(29) |
May
(17) |
Jun
(14) |
Jul
(33) |
Aug
(11) |
Sep
(7) |
Oct
(7) |
Nov
(6) |
Dec
(10) |
2012 |
Jan
(19) |
Feb
(12) |
Mar
(16) |
Apr
(6) |
May
(18) |
Jun
(18) |
Jul
(31) |
Aug
(25) |
Sep
|
Oct
(31) |
Nov
(21) |
Dec
(9) |
2013 |
Jan
(8) |
Feb
(16) |
Mar
(8) |
Apr
(7) |
May
(3) |
Jun
(29) |
Jul
(29) |
Aug
|
Sep
(7) |
Oct
(9) |
Nov
(1) |
Dec
(1) |
2014 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(13) |
May
(8) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(4) |
Oct
(2) |
Nov
|
Dec
(2) |
2015 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark D. <Mar...@sa...> - 2005-03-22 21:48:57
|
For the record, the reason I don't like requiring ourselves to be = compatible with 1.3 or older is because there ARE advantages to using = newer JDKs (not having to include extra jars like Jakarta ORO, parts of = xerces, or extra classes, for example). =20 If everyone writes their Java applications to be compatible with 1.3 = then no one moves forward and we stay at the same place forever and no = one makes any progress. This is, of course, an exaggeration. (And it's = somewhat different for Cobertura, since we're a development tool and not = an end-user application.) =20 However, I like being a reason for people to stop catering to old JDKs. = I guess it's similar to the Web Standards Project = http://www.webstandards.org/upgrade/. =20 -Mark =20 =20 ________________________________ From: Jeremy Ryan Thomerson [mailto:je...@th...]=20 Sent: Tuesday, March 22, 2005 4:19 PM To: Woodward, John; Mark Doliner; cob...@li... Subject: Re: [Cobertura-devel] Using jdk 1.3? =09 =09 To everyone's knowledge is that String.replacecAll(...) our only = incompatibility with JDK less than 1.4? If so, I'll just commit the = StringUtil I had written originally so that we could avoid using = String.replaceAll(...) and we'd be backward compatible. I think that it = is something we really should do, at least back to 1.3, but I'd prefer = to see us work back to 1.2. I think we have a lot better chance of = increasing adoption by being compatible back to 1.2. =20 jeremy ----- Original Message -----=20 From: Woodward, John <mailto:Joh...@sa...> =20 To: Mark Doliner <mailto:Mar...@sa...> ; = cob...@li...=20 Sent: Tuesday, March 22, 2005 10:03 AM Subject: RE: [Cobertura-devel] Using jdk 1.3? I understand that completely. The situation here is a platform that = requires us to use 1.3 --- and they are relying on some 1.3 class = structures. For my purposes, the code coverage could be done completely = with 1.4 (ignoring the 1 compiler error we get), so ... I may end up = doing some fiddling with the jdk versions. =20 Let me see what I can do. =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 10:01 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Using jdk 1.3? =20 FYI line 186 is a call to String.replaceAll(), which is new in jdk1.4. =20 It might be possible to compile your classes with 1.3 (or use 1.4 and = specify a 1.3 source and target), instrument your classes using 1.4, run = your tests using 1.3, then generate the coverage reports using 1.4. It = seems like it would take some annoying fiddling with ant to get that to = work correctly. =20 The other option is to modify Cobertura to work with 1.3. That's not = something I'm against... I was just hoping we could avoid it. -Mark =20 =20 =09 ________________________________ From: cob...@li... = [mailto:cob...@li...] On Behalf Of = Woodward, John Sent: Tuesday, March 22, 2005 10:48 AM To: cob...@li... Subject: [Cobertura-devel] Using jdk 1.3? I have a project that requires jdk1.3. Is there any way to use = Cobertura with 1.3? When I do, I consistently get the following = exception: =20 java.lang.NoSuchMethodError at = org.apache.tools.ant.Project.executeTarget(Project.java:1246) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at = net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingTa= sk.java:186) at = net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatchingT= ask.java:156) at = net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.java= :101) at = net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java:= 149) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at = org.apache.tools.ant.Project.executeTarget(Project.java:1237) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) =20 Alternatively, with multiple jdk's installed, is there any way I can = specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? =20 Thanks! =20 John =20 |
From: Mark D. <Mar...@sa...> - 2005-03-22 21:34:00
|
I think the pattern matching code is 1.4-only, but you could go back to = using Jakarta ORO. I have a feeling we would need to include another = jar from xerces--but that's not a big deal. =20 If you want to get things working with 1.3, feel free. I should point = out that since the ant tasks and everything else have different and = incompatible licenses, if you DO commit your String.replaceAll = replacement, you'll either need to have a two separate copies or I guess = you could have 1 copy and explicitly state that the file is = dual-licensed under the GPL and the Apache Source License. =20 -Mark =20 ________________________________ From: Jeremy Ryan Thomerson [mailto:je...@th...]=20 Sent: Tuesday, March 22, 2005 4:19 PM To: Woodward, John; Mark Doliner; cob...@li... Subject: Re: [Cobertura-devel] Using jdk 1.3? =09 =09 To everyone's knowledge is that String.replacecAll(...) our only = incompatibility with JDK less than 1.4? If so, I'll just commit the = StringUtil I had written originally so that we could avoid using = String.replaceAll(...) and we'd be backward compatible. I think that it = is something we really should do, at least back to 1.3, but I'd prefer = to see us work back to 1.2. I think we have a lot better chance of = increasing adoption by being compatible back to 1.2. =20 jeremy ----- Original Message -----=20 From: Woodward, John <mailto:Joh...@sa...> =20 To: Mark Doliner <mailto:Mar...@sa...> ; = cob...@li...=20 Sent: Tuesday, March 22, 2005 10:03 AM Subject: RE: [Cobertura-devel] Using jdk 1.3? I understand that completely. The situation here is a platform that = requires us to use 1.3 --- and they are relying on some 1.3 class = structures. For my purposes, the code coverage could be done completely = with 1.4 (ignoring the 1 compiler error we get), so ... I may end up = doing some fiddling with the jdk versions. =20 Let me see what I can do. =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 10:01 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Using jdk 1.3? =20 FYI line 186 is a call to String.replaceAll(), which is new in jdk1.4. =20 It might be possible to compile your classes with 1.3 (or use 1.4 and = specify a 1.3 source and target), instrument your classes using 1.4, run = your tests using 1.3, then generate the coverage reports using 1.4. It = seems like it would take some annoying fiddling with ant to get that to = work correctly. =20 The other option is to modify Cobertura to work with 1.3. That's not = something I'm against... I was just hoping we could avoid it. -Mark =20 =20 =09 ________________________________ From: cob...@li... = [mailto:cob...@li...] On Behalf Of = Woodward, John Sent: Tuesday, March 22, 2005 10:48 AM To: cob...@li... Subject: [Cobertura-devel] Using jdk 1.3? I have a project that requires jdk1.3. Is there any way to use = Cobertura with 1.3? When I do, I consistently get the following = exception: =20 java.lang.NoSuchMethodError at = org.apache.tools.ant.Project.executeTarget(Project.java:1246) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at = net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingTa= sk.java:186) at = net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatchingT= ask.java:156) at = net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.java= :101) at = net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java:= 149) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at = org.apache.tools.ant.Project.executeTarget(Project.java:1237) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) =20 Alternatively, with multiple jdk's installed, is there any way I can = specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? =20 Thanks! =20 John =20 |
From: Jeremy R. T. <je...@th...> - 2005-03-22 21:19:31
|
To everyone's knowledge is that String.replacecAll(...) our only = incompatibility with JDK less than 1.4? If so, I'll just commit the = StringUtil I had written originally so that we could avoid using = String.replaceAll(...) and we'd be backward compatible. I think that it = is something we really should do, at least back to 1.3, but I'd prefer = to see us work back to 1.2. I think we have a lot better chance of = increasing adoption by being compatible back to 1.2. jeremy ----- Original Message -----=20 From: Woodward, John=20 To: Mark Doliner ; cob...@li...=20 Sent: Tuesday, March 22, 2005 10:03 AM Subject: RE: [Cobertura-devel] Using jdk 1.3? I understand that completely. The situation here is a platform that = requires us to use 1.3 --- and they are relying on some 1.3 class = structures. For my purposes, the code coverage could be done completely = with 1.4 (ignoring the 1 compiler error we get), so . I may end up doing = some fiddling with the jdk versions. Let me see what I can do. J -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 10:01 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Using jdk 1.3? FYI line 186 is a call to String.replaceAll(), which is new in jdk1.4. It might be possible to compile your classes with 1.3 (or use 1.4 and = specify a 1.3 source and target), instrument your classes using 1.4, run = your tests using 1.3, then generate the coverage reports using 1.4. It = seems like it would take some annoying fiddling with ant to get that to = work correctly. The other option is to modify Cobertura to work with 1.3. That's not = something I'm against... I was just hoping we could avoid it. -Mark -------------------------------------------------------------------------= --- From: cob...@li... = [mailto:cob...@li...] On Behalf Of = Woodward, John Sent: Tuesday, March 22, 2005 10:48 AM To: cob...@li... Subject: [Cobertura-devel] Using jdk 1.3? I have a project that requires jdk1.3. Is there any way to use = Cobertura with 1.3? When I do, I consistently get the following = exception: java.lang.NoSuchMethodError at = org.apache.tools.ant.Project.executeTarget(Project.java:1246) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at = net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingTa= sk.java:186) at = net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatchingT= ask.java:156) at = net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.java= :101) at = net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java:= 149) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at = org.apache.tools.ant.Project.executeTarget(Project.java:1237) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) Alternatively, with multiple jdk's installed, is there any way I can = specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? Thanks! John |
From: Bob M. <bo...@mc...> - 2005-03-22 18:50:48
|
I've recently incorporated Cobertura into our build process and like what I have seen so far and have a couple usage questions. 1) Is it possible to specify the location to which the cobertura.ser gets written? Using the examples from the distribution, this file gets written to the root of the project directory. 2) Is it possible to filter out certain private methods from instrumentation or the coverage report? Specifically, I would like Cobertura to ignore private constructors. It is common for us to have a collection of static utility methods contained in a class with a private constructor. It would be nice to filter out this private constructor as it isn't, and shouldn't, be used. Thanks, Bob |
From: Woodward, J. <Joh...@sa...> - 2005-03-22 16:55:18
|
=20 If I reverse the order in which I apply AspectJ and Cobertura, I can get over the "unknown attribute" error ... but then (like I've seen with JCoverage) some of my unit tests fail to run properly, and I get incorrect failed unit tests. It seems that aspectj must be applied before cobertura or jcoverage for some reason. =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 9:55 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Doesn't play well with AspectJ =20 Hmm, are the AspectJ jars in the classpath you use for the Cobertura ant taskdef? -Mark =20 =09 ________________________________ From: cob...@li... [mailto:cob...@li...] On Behalf Of Woodward, John Sent: Tuesday, March 22, 2005 10:53 AM To: cob...@li... Subject: [Cobertura-devel] Doesn't play well with AspectJ Another potential issue other than the jdk version is that it doesn't look like Cobertura plays well with AspectJ. After changing my jdk to 1.5 and attempting to just instrument the code with cobertura, I get the following: =20 [cobertura-instrument] Exception in thread "main" java.lang.IllegalArgumentException: Unknown attribute type: org.aspect j.weaver.WeaverVersion [cobertura-instrument] at org.objectweb.asm.Attribute.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.toByteArray(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:120 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:172 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.parseArguments(Main.java:189) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.main(Main.java:248) =20 =20 j =20 =20 =20 |
From: Woodward, J. <Joh...@sa...> - 2005-03-22 16:24:10
|
I believe so. I'm loading the Cobertura taskdef this way: =20 <taskdef resource=3D"tasks.properties"> <classpath refid=3D"test.classpath"/> </taskdef> =20 and test.classpath does include the aspectj jar files: =20 =20 =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 9:55 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Doesn't play well with AspectJ =20 Hmm, are the AspectJ jars in the classpath you use for the Cobertura ant taskdef? -Mark =20 =09 ________________________________ From: cob...@li... [mailto:cob...@li...] On Behalf Of Woodward, John Sent: Tuesday, March 22, 2005 10:53 AM To: cob...@li... Subject: [Cobertura-devel] Doesn't play well with AspectJ Another potential issue other than the jdk version is that it doesn't look like Cobertura plays well with AspectJ. After changing my jdk to 1.5 and attempting to just instrument the code with cobertura, I get the following: =20 [cobertura-instrument] Exception in thread "main" java.lang.IllegalArgumentException: Unknown attribute type: org.aspect j.weaver.WeaverVersion [cobertura-instrument] at org.objectweb.asm.Attribute.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.toByteArray(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:120 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:172 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.parseArguments(Main.java:189) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.main(Main.java:248) =20 =20 j =20 =20 =20 |
From: Woodward, J. <Joh...@sa...> - 2005-03-22 16:04:27
|
I understand that completely. The situation here is a platform that requires us to use 1.3 --- and they are relying on some 1.3 class structures. For my purposes, the code coverage could be done completely with 1.4 (ignoring the 1 compiler error we get), so ... I may end up doing some fiddling with the jdk versions. =20 Let me see what I can do. =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 10:01 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Using jdk 1.3? =20 FYI line 186 is a call to String.replaceAll(), which is new in jdk1.4. =20 It might be possible to compile your classes with 1.3 (or use 1.4 and specify a 1.3 source and target), instrument your classes using 1.4, run your tests using 1.3, then generate the coverage reports using 1.4. It seems like it would take some annoying fiddling with ant to get that to work correctly. =20 The other option is to modify Cobertura to work with 1.3. That's not something I'm against... I was just hoping we could avoid it. -Mark =20 =20 =09 ________________________________ From: cob...@li... [mailto:cob...@li...] On Behalf Of Woodward, John Sent: Tuesday, March 22, 2005 10:48 AM To: cob...@li... Subject: [Cobertura-devel] Using jdk 1.3? I have a project that requires jdk1.3. Is there any way to use Cobertura with 1.3? When I do, I consistently get the following exception: =20 java.lang.NoSuchMethodError at org.apache.tools.ant.Project.executeTarget(Project.java:1246) at org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingT ask.java:186) at net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatching Task.java:156) at net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.jav a:101) at net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java :149) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at org.apache.tools.ant.Project.executeTarget(Project.java:1237) at org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) =20 Alternatively, with multiple jdk's installed, is there any way I can specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? =20 Thanks! =20 John =20 |
From: Mark D. <Mar...@sa...> - 2005-03-22 16:01:03
|
FYI line 186 is a call to String.replaceAll(), which is new in jdk1.4. =20 It might be possible to compile your classes with 1.3 (or use 1.4 and = specify a 1.3 source and target), instrument your classes using 1.4, run = your tests using 1.3, then generate the coverage reports using 1.4. It = seems like it would take some annoying fiddling with ant to get that to = work correctly. =20 The other option is to modify Cobertura to work with 1.3. That's not = something I'm against... I was just hoping we could avoid it. -Mark =20 ________________________________ From: cob...@li... = [mailto:cob...@li...] On Behalf Of = Woodward, John Sent: Tuesday, March 22, 2005 10:48 AM To: cob...@li... Subject: [Cobertura-devel] Using jdk 1.3? =09 =09 I have a project that requires jdk1.3. Is there any way to use = Cobertura with 1.3? When I do, I consistently get the following = exception: =20 java.lang.NoSuchMethodError at = org.apache.tools.ant.Project.executeTarget(Project.java:1246) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at = net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingTa= sk.java:186) at = net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatchingT= ask.java:156) at = net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.java= :101) at = net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java:= 149) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at = org.apache.tools.ant.Project.executeTarget(Project.java:1237) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) =20 Alternatively, with multiple jdk's installed, is there any way I can = specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? =20 Thanks! =20 John =20 |
From: Mark D. <Mar...@sa...> - 2005-03-22 15:55:58
|
Hmm, are the AspectJ jars in the classpath you use for the Cobertura ant = taskdef? -Mark ________________________________ From: cob...@li... = [mailto:cob...@li...] On Behalf Of = Woodward, John Sent: Tuesday, March 22, 2005 10:53 AM To: cob...@li... Subject: [Cobertura-devel] Doesn't play well with AspectJ =09 =09 Another potential issue other than the jdk version is that it doesn't = look like Cobertura plays well with AspectJ. After changing my jdk to = 1.5 and attempting to just instrument the code with cobertura, I get the = following: =20 [cobertura-instrument] Exception in thread "main" = java.lang.IllegalArgumentException: Unknown attribute type: org.aspect j.weaver.WeaverVersion [cobertura-instrument] at org.objectweb.asm.Attribute.a(Unknown = Source) [cobertura-instrument] at = org.objectweb.asm.ClassWriter.toByteArray(Unknown Source) [cobertura-instrument] at = net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:120)= [cobertura-instrument] at = net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:172)= [cobertura-instrument] at = net.sourceforge.cobertura.coverage.Main.parseArguments(Main.java:189) [cobertura-instrument] at = net.sourceforge.cobertura.coverage.Main.main(Main.java:248) =20 =20 j =20 =20 =20 |
From: Woodward, J. <Joh...@sa...> - 2005-03-22 15:52:47
|
Another potential issue other than the jdk version is that it doesn't look like Cobertura plays well with AspectJ. After changing my jdk to 1.5 and attempting to just instrument the code with cobertura, I get the following: =20 [cobertura-instrument] Exception in thread "main" java.lang.IllegalArgumentException: Unknown attribute type: org.aspect j.weaver.WeaverVersion [cobertura-instrument] at org.objectweb.asm.Attribute.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.toByteArray(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:120 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:172 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.parseArguments(Main.java:189) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.main(Main.java:248) =20 =20 j =20 =20 =20 |
From: Woodward, J. <Joh...@sa...> - 2005-03-22 15:48:15
|
I have a project that requires jdk1.3. Is there any way to use Cobertura with 1.3? When I do, I consistently get the following exception: =20 java.lang.NoSuchMethodError at org.apache.tools.ant.Project.executeTarget(Project.java:1246) at org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingT ask.java:186) at net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatching Task.java:156) at net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.jav a:101) at net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java :149) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at org.apache.tools.ant.Project.executeTarget(Project.java:1237) at org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) =20 Alternatively, with multiple jdk's installed, is there any way I can specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? =20 Thanks! =20 John =20 |
From: Jeremy R. T. <je...@th...> - 2005-03-21 19:41:56
|
Thanks for the heads-up. Looks like Mark will be conversing with them (he posted to the URL that you sent). Thanks! Jeremy Thomerson ----- Original Message ----- From: "Jared Richardson" <Jar...@sa...> To: "Jeremy Ryan Thomerson" <je...@th...>; "Charles Blaxland" <Cha...@eb...>; <cob...@li...> Sent: Monday, March 21, 2005 7:52 AM Subject: RE: [Cobertura-devel] maven plugin Hi all, We have at least basic interest from some Maven guys... http://jira.codehaus.org/browse/MPJCOVERAGE-25 but I don't have any idea if they are actively working on a plugin. Since there is already a JCoverage plugin, I don't think it would be much effort. I'd suggest posting to the Maven development mailing list to make sure you aren't duplicating work. Jared > -----Original Message----- > From: cob...@li... > [mailto:cob...@li...] On > Behalf Of Jeremy Ryan Thomerson > Sent: Monday, March 21, 2005 8:24 AM > To: Charles Blaxland; cob...@li... > Subject: Re: [Cobertura-devel] maven plugin > > Charles, > Thanks for your interests. Right now we don't have any maven plugin > support, but if you could submit a patch to accomodate this, > that would be > great! > > As far as 1.5, we're not 100% sure, but we think it should. > I should be > committing a patch today (to CVS only) that will allow the > cobertura code > itself to compile on 1.5. It seems that a method signature > for some XML > stuff now declares an additional exception that we need to > catch. But as > far as we know (and plan), Cobertura should work for 1.5 . > By all means, > let us know if you have any problems with it, or better yet, > submit a patch > if you find any issues and have the opportunity to fix them. > > Thanks again, and we look forward to seeing some patches! > Jeremy > > ----- Original Message ----- > From: "Charles Blaxland" <Cha...@eb...> > To: <cob...@li...> > Sent: Monday, March 21, 2005 3:15 AM > Subject: [Cobertura-devel] maven plugin > > > > Hi, > > > > Just wondering if there is a maven report plugin for > cobertura, or if > > one is planned? If not, I could probably get a basic one > working that > > I'd be happy to submit back to the project. > > > > Also, does cobertura support sources compiled with jdk1.5? > > > > Cheers, > > Charles > > > > > > > > ------------------------------------------------------- > > 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_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=ick _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Jared R. <Jar...@sa...> - 2005-03-21 13:54:17
|
Hi all, We have at least basic interest from some Maven guys... = http://jira.codehaus.org/browse/MPJCOVERAGE-25 but I don't have any idea = if they are actively working on a plugin. Since there is already a = JCoverage plugin, I don't think it would be much effort. I'd suggest posting to the Maven development mailing list to make sure = you aren't duplicating work. Jared > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of Jeremy Ryan Thomerson > Sent: Monday, March 21, 2005 8:24 AM > To: Charles Blaxland; cob...@li... > Subject: Re: [Cobertura-devel] maven plugin >=20 > Charles, > Thanks for your interests. Right now we don't have any maven plugin > support, but if you could submit a patch to accomodate this,=20 > that would be > great! >=20 > As far as 1.5, we're not 100% sure, but we think it should. =20 > I should be > committing a patch today (to CVS only) that will allow the=20 > cobertura code > itself to compile on 1.5. It seems that a method signature=20 > for some XML > stuff now declares an additional exception that we need to=20 > catch. But as > far as we know (and plan), Cobertura should work for 1.5 . =20 > By all means, > let us know if you have any problems with it, or better yet,=20 > submit a patch > if you find any issues and have the opportunity to fix them. >=20 > Thanks again, and we look forward to seeing some patches! > Jeremy >=20 > ----- Original Message -----=20 > From: "Charles Blaxland" <Cha...@eb...> > To: <cob...@li...> > Sent: Monday, March 21, 2005 3:15 AM > Subject: [Cobertura-devel] maven plugin >=20 >=20 > > Hi, > > > > Just wondering if there is a maven report plugin for=20 > cobertura, or if > > one is planned? If not, I could probably get a basic one=20 > working that > > I'd be happy to submit back to the project. > > > > Also, does cobertura support sources compiled with jdk1.5? > > > > Cheers, > > Charles > > > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products=20 > from real users. > > Discover which products truly live up to the hype. Start=20 > reading now. > > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from=20 > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 |
From: Jeremy R. T. <je...@th...> - 2005-03-21 13:25:04
|
Charles, Thanks for your interests. Right now we don't have any maven plugin support, but if you could submit a patch to accomodate this, that would be great! As far as 1.5, we're not 100% sure, but we think it should. I should be committing a patch today (to CVS only) that will allow the cobertura code itself to compile on 1.5. It seems that a method signature for some XML stuff now declares an additional exception that we need to catch. But as far as we know (and plan), Cobertura should work for 1.5 . By all means, let us know if you have any problems with it, or better yet, submit a patch if you find any issues and have the opportunity to fix them. Thanks again, and we look forward to seeing some patches! Jeremy ----- Original Message ----- From: "Charles Blaxland" <Cha...@eb...> To: <cob...@li...> Sent: Monday, March 21, 2005 3:15 AM Subject: [Cobertura-devel] maven plugin > Hi, > > Just wondering if there is a maven report plugin for cobertura, or if > one is planned? If not, I could probably get a basic one working that > I'd be happy to submit back to the project. > > Also, does cobertura support sources compiled with jdk1.5? > > Cheers, > Charles > > > > ------------------------------------------------------- > 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 |
From: Charles B. <Cha...@eb...> - 2005-03-21 09:14:27
|
Hi, Just wondering if there is a maven report plugin for cobertura, or if one is planned? If not, I could probably get a basic one working that I'd be happy to submit back to the project. Also, does cobertura support sources compiled with jdk1.5? Cheers, Charles |
From: Jeremy R. T. <je...@th...> - 2005-03-19 13:42:54
|
We could consider that, depending on the licenses of needed libraries, etc. Could you file a feature request for this? Thanks Jeremy Thomerson ----- Original Message ----- From: "Grzegorz Lukasik" <ha...@gm...> To: <cob...@li...> Sent: Saturday, March 19, 2005 5:38 AM Subject: [Cobertura-devel] Creating single distribution jar. > Do you considier packing all needed classes - from Cobertura and all > depended libraries - into one single jar? Otherwise you have to put > these libraries into the class path when instrumenting or running > junit tests. Clover is packed this way. > > I have encountered this problem when I was for the first time using > Cobertura. In HTML documentation the need for other libraries in the > classpath is not mentioned. > > Hauser > > > ------------------------------------------------------- > 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 |
From: Grzegorz L. <ha...@gm...> - 2005-03-19 11:38:14
|
Do you considier packing all needed classes - from Cobertura and all depended libraries - into one single jar? Otherwise you have to put these libraries into the class path when instrumenting or running junit tests. Clover is packed this way. I have encountered this problem when I was for the first time using Cobertura. In HTML documentation the need for other libraries in the classpath is not mentioned. Hauser |
From: Mark D. <Mar...@sa...> - 2005-03-16 20:28:56
|
You could try passing -Xmx512m to ant. I have a feeling this won't = work, but it's worth a shot. The ant tasks start a new JVM to do the = instrumentating, and I don't think we have a way to set the max memory = size for that JVM (but there is a chance this max memory size is = inherited from the ant JVM). If the above does not work, you could try calling the instrument class = directly, with something like java -Xms512m -cp cobertura.jar net.sourceforge.cobertura.coverage.Main = -d C:\output\directory C:\compiled\classes\directory At least, I think that's right... -Mark > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of Allan Caplan > Sent: Monday, March 14, 2005 2:18 PM > To: cob...@li... > Subject: [Cobertura-devel] Out of Memory Exception >=20 > When running instrument on a LARGE codebase (6700 classes), I get an > out of memory exception. >=20 > I re-ran with verbose output, and this was all I could get: >=20 > [cobertura-instrument] java.lang.OutOfMemoryError > [cobertura-instrument] java.lang.OutOfMemoryError > [cobertura-instrument] Exception in thread "main" >=20 >=20 > BUILD FAILED > C:\Java\build2\personal.xml:220: null > at=20 > net.sourceforge.cobertura.ant.InstrumentTask.coverage(Instrume > ntTask.java:116) > at=20 > net.sourceforge.cobertura.ant.InstrumentTask.execute(Instrumen > tTask.java:149) > at=20 > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:301) > at org.apache.tools.ant.Target.performTasks(Target.java:328) > at=20 > org.apache.tools.ant.Project.executeTarget(Project.java:1215) > at=20 > org.apache.tools.ant.Project.executeTargets(Project.java:1063) > at org.apache.tools.ant.Main.runBuild(Main.java:632) > at org.apache.tools.ant.Main.startAnt(Main.java:183) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56) >=20 > Any help would be appreciated > Thx >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from=20 > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 |
From: Allan C. <al...@gm...> - 2005-03-14 19:18:24
|
When running instrument on a LARGE codebase (6700 classes), I get an out of memory exception. I re-ran with verbose output, and this was all I could get: [cobertura-instrument] java.lang.OutOfMemoryError [cobertura-instrument] java.lang.OutOfMemoryError [cobertura-instrument] Exception in thread "main" BUILD FAILED C:\Java\build2\personal.xml:220: null at net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.java:116) at net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java:149) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:301) at org.apache.tools.ant.Target.performTasks(Target.java:328) at org.apache.tools.ant.Project.executeTarget(Project.java:1215) at org.apache.tools.ant.Project.executeTargets(Project.java:1063) at org.apache.tools.ant.Main.runBuild(Main.java:632) at org.apache.tools.ant.Main.startAnt(Main.java:183) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56) Any help would be appreciated Thx |
From: Brian D. <bri...@ya...> - 2005-03-14 17:43:47
|
I'm not sure what I did now but it's working just fine a few minutes ago. Thanks for your looking into this for me! I'm trying to figure out what I'm doing differently now. --- Jeremy Ryan Thomerson <je...@th...> wrote: > Brian, > I didn't notice anything wrong with your setup. Have you figured > it out > yet? Are you compiling with debug on? If you're still having > problems, let > me know, and I'll try to work through it with you when you have > some time. > > Sorry, > Jeremy > > ----- Original Message ----- > From: "Brian Doyle" <bri...@ya...> > To: "Jeremy Ryan Thomerson" <je...@th...>; "Mark > Doliner" > <Mar...@sa...>; <Cob...@li...> > Sent: Thursday, March 10, 2005 10:50 AM > Subject: RE: [Cobertura-devel] 0% code coverage > > > > Sure here is what I've got for the details: > > > > src/com > > application-context.xml > > > > test/com > > classes > > > > build/classes > > instrumented-classes > > > > The src/ directory has the production code and gets compiled to > the > > build/classes directory. The unit test source is compiled into > the > > test/classes directory. After compiling and before running the > unit > > tests I instrument the production code to the > > build/instrumented-classes directory. I do a command line diff > on > > the build/classes and build/instrumented-classes directories > after > > compiling and there is no difference at all. When I run the > unit > > tests I'm putting the instrumented directory first in the > classpath > > and the build-classes second and the src third (I put the src > into > > the classpath to pick up the application-context.xml) In the > setup > > of the unit tests it will call ClassPathXmlApplicationContext to > load > > in the applicationContext.xml. When I run the unit tests I get > 0% > > coverage. Per Mark's suggestion I copied the instrumented files > > over to the build/classes directory (thus overwriting the > > non-instrumented files) and then > > the first test case that runs and gets a bean from the > > applicationController in Spring fails with the error: > > > > [junit] > > org.springframework.beans.factory.BeanDefinitionStoreException: > Error > > registering bean with name 'webController' defined in class path > > resource [applicationContext.xml]: Class that bean class > > [com.aptas.etosha.web.webcontroller.DefaultWebControllerImpl] > depends > > on not found; nested exception is java.lang.NoClassDefFoundError: > > com/aptas/etosha/web/webcontroller/WebController > > > > This class exists and is present in the both the build/classes > and > > build/instrumented-classes directories. It appears that when > > instrumenting the classes something happens such that Spring > cannot > > find those instrumented files at all. Thanks! > > > > > > > > > > --- Jeremy Ryan Thomerson <je...@th...> wrote: > > > > > 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 > > > > > > > > > > > > ------------------------------------------------------- > > > 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 > > > > > > > --- Jeremy Ryan Thomerson <je...@th...> wrote: > > > > > 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 > > > > > > > > > > > > ------------------------------------------------------- > > > 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 > > > > > > > > > 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 > > > > 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 |
From: Jeremy R. T. <je...@th...> - 2005-03-14 14:03:06
|
Brian, I didn't notice anything wrong with your setup. Have you figured it out yet? Are you compiling with debug on? If you're still having problems, let me know, and I'll try to work through it with you when you have some time. Sorry, Jeremy ----- Original Message ----- From: "Brian Doyle" <bri...@ya...> To: "Jeremy Ryan Thomerson" <je...@th...>; "Mark Doliner" <Mar...@sa...>; <Cob...@li...> Sent: Thursday, March 10, 2005 10:50 AM Subject: RE: [Cobertura-devel] 0% code coverage > Sure here is what I've got for the details: > > src/com > application-context.xml > > test/com > classes > > build/classes > instrumented-classes > > The src/ directory has the production code and gets compiled to the > build/classes directory. The unit test source is compiled into the > test/classes directory. After compiling and before running the unit > tests I instrument the production code to the > build/instrumented-classes directory. I do a command line diff on > the build/classes and build/instrumented-classes directories after > compiling and there is no difference at all. When I run the unit > tests I'm putting the instrumented directory first in the classpath > and the build-classes second and the src third (I put the src into > the classpath to pick up the application-context.xml) In the setup > of the unit tests it will call ClassPathXmlApplicationContext to load > in the applicationContext.xml. When I run the unit tests I get 0% > coverage. Per Mark's suggestion I copied the instrumented files > over to the build/classes directory (thus overwriting the > non-instrumented files) and then > the first test case that runs and gets a bean from the > applicationController in Spring fails with the error: > > [junit] > org.springframework.beans.factory.BeanDefinitionStoreException: Error > registering bean with name 'webController' defined in class path > resource [applicationContext.xml]: Class that bean class > [com.aptas.etosha.web.webcontroller.DefaultWebControllerImpl] depends > on not found; nested exception is java.lang.NoClassDefFoundError: > com/aptas/etosha/web/webcontroller/WebController > > This class exists and is present in the both the build/classes and > build/instrumented-classes directories. It appears that when > instrumenting the classes something happens such that Spring cannot > find those instrumented files at all. Thanks! > > > > > --- Jeremy Ryan Thomerson <je...@th...> wrote: > > > 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 > > > > > > > > ------------------------------------------------------- > > 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 > > > > --- Jeremy Ryan Thomerson <je...@th...> wrote: > > > 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 > > > > > > > > ------------------------------------------------------- > > 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 > > > > > 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 |
From: Brian D. <bri...@ya...> - 2005-03-10 16:50:54
|
Sure here is what I've got for the details: src/com application-context.xml test/com classes build/classes instrumented-classes The src/ directory has the production code and gets compiled to the build/classes directory. The unit test source is compiled into the test/classes directory. After compiling and before running the unit tests I instrument the production code to the build/instrumented-classes directory. I do a command line diff on the build/classes and build/instrumented-classes directories after compiling and there is no difference at all. When I run the unit tests I'm putting the instrumented directory first in the classpath and the build-classes second and the src third (I put the src into the classpath to pick up the application-context.xml) In the setup of the unit tests it will call ClassPathXmlApplicationContext to load in the applicationContext.xml. When I run the unit tests I get 0% coverage. Per Mark's suggestion I copied the instrumented files over to the build/classes directory (thus overwriting the non-instrumented files) and then the first test case that runs and gets a bean from the applicationController in Spring fails with the error: [junit] org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'webController' defined in class path resource [applicationContext.xml]: Class that bean class [com.aptas.etosha.web.webcontroller.DefaultWebControllerImpl] depends on not found; nested exception is java.lang.NoClassDefFoundError: com/aptas/etosha/web/webcontroller/WebController This class exists and is present in the both the build/classes and build/instrumented-classes directories. It appears that when instrumenting the classes something happens such that Spring cannot find those instrumented files at all. Thanks! --- Jeremy Ryan Thomerson <je...@th...> wrote: > 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 > > > > ------------------------------------------------------- > 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 > --- Jeremy Ryan Thomerson <je...@th...> wrote: > 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 > > > > ------------------------------------------------------- > 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 > 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 |
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 |
From: Brian D. <bri...@ya...> - 2005-03-09 23:14:41
|
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 |
From: Mark D. <Mar...@sa...> - 2005-03-09 22:38:31
|
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...=20 > [mailto:cob...@li...] On=20 > Behalf Of Brian Doyle > Sent: Wednesday, March 09, 2005 4:05 PM > To: Cob...@li... > Subject: RE: [Cobertura-devel] 0% code coverage >=20 > 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! >=20 > --- 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. > >=20 > > 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 > >=20 > >=20 > > > -----Original Message----- > > > From: cob...@li...=20 > > > [mailto:cob...@li...] On=20 > > > Behalf Of Brian Doyle > > > Sent: Wednesday, March 09, 2005 12:57 PM > > > To: Cob...@li... > > > Subject: [Cobertura-devel] 0% code coverage > > >=20 > > > 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.=20 > > > 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?=20 > > Thanks. > > > =20 > > >=20 > > > Brian Doyle > >=20 > >=20 > > ------------------------------------------------------- > > 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_id=14396&op=3Dclick > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > >=20 >=20 > Brian Doyle >=20 > I don't know about ignorance, and I don't care about apathy,=20 > but I simply will not put up with intolerance! - Unknown >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from=20 > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 |