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: John W. L. <Joh...@sa...> - 2010-07-12 18:40:49
|
You might also want to try creating the jar first. Then, instrument the jar. I also don’t see the cobertura.jar on your classpath. John From: Michel MAURICE [mailto:mic...@ya...] Sent: Monday, July 12, 2010 1:37 PM To: cob...@li... Subject: [Cobertura-devel] Unable to access jar file Hi, I cannot solve a problem. The steps are the following: 1. I compile my application and generate the jar file with the good manifest 2. I run it : ok 3. I instrumente with cobertura using the bat file and create the instumented jar file with the same manifest file, see the commands in the context below: Rem : Instrumentation de l'application Editeur de courbes pour mesure de couverture Echo on cd c:\editeur_graphe\ rmdir instrumented del cobertura.ser call cobertura-instrument.bat --destination .\instrumented .\executables Rem : Copy des ressources cd instrumented xcopy ..\ressources\*.class .\fr\guehenneux\graphe\fonction /e /y Rem : Generation du jar de l'application Editeur de courbes jar cvmf ..\ressources\MANIFEST.MF .\EditeurGraphe.jar *.* Rem : Fin de generation echo off cd .. 4. I want to run some use cases for test, using the command bellow, as explain in your documentation: java -classpath .;C:\Editeur_Graphe\instrumented;C:\Editeur_Graphe\executables;C:\Editeur_Graphe\sources -Dnet.sourceforge.cobertura.datafile=C:\Editeur_Graphe\cobertura.ser -jar EditeurGraphe.jar; I hope the instrumented application running, but I have the message Unable to access jar file ... For your information I have use your procedure with a simple .class it's OK, I can report coverage. Many thanks for your help. Best regards. Michel MAURICE |
From: John W. L. <Joh...@sa...> - 2010-07-12 18:36:33
|
Please show me the exact message. “Unable to access jar file” is not in the Cobertura source. From: Michel MAURICE [mailto:mic...@ya...] Sent: Monday, July 12, 2010 1:37 PM To: cob...@li... Subject: [Cobertura-devel] Unable to access jar file Hi, I cannot solve a problem. The steps are the following: 1. I compile my application and generate the jar file with the good manifest 2. I run it : ok 3. I instrumente with cobertura using the bat file and create the instumented jar file with the same manifest file, see the commands in the context below: Rem : Instrumentation de l'application Editeur de courbes pour mesure de couverture Echo on cd c:\editeur_graphe\ rmdir instrumented del cobertura.ser call cobertura-instrument.bat --destination .\instrumented .\executables Rem : Copy des ressources cd instrumented xcopy ..\ressources\*.class .\fr\guehenneux\graphe\fonction /e /y Rem : Generation du jar de l'application Editeur de courbes jar cvmf ..\ressources\MANIFEST.MF .\EditeurGraphe.jar *.* Rem : Fin de generation echo off cd .. 4. I want to run some use cases for test, using the command bellow, as explain in your documentation: java -classpath .;C:\Editeur_Graphe\instrumented;C:\Editeur_Graphe\executables;C:\Editeur_Graphe\sources -Dnet.sourceforge.cobertura.datafile=C:\Editeur_Graphe\cobertura.ser -jar EditeurGraphe.jar; I hope the instrumented application running, but I have the message Unable to access jar file ... For your information I have use your procedure with a simple .class it's OK, I can report coverage. Many thanks for your help. Best regards. Michel MAURICE |
From: Michel M. <mic...@ya...> - 2010-07-12 18:04:18
|
Hi, I cannot solve a problem. The steps are the following: 1. I compile my application and generate the jar file with the good manifest 2. I run it : ok 3. I instrumente with cobertura using the bat file and create the instumented jar file with the same manifest file, see the commands in the context below: Rem : Instrumentation de l'application Editeur de courbes pour mesure de couverture Echo on cd c:\editeur_graphe\ rmdir instrumented del cobertura.ser call cobertura-instrument.bat --destination .\instrumented .\executables Rem : Copy des ressources cd instrumented xcopy ..\ressources\*.class .\fr\guehenneux\graphe\fonction /e /y Rem : Generation du jar de l'application Editeur de courbes jar cvmf ..\ressources\MANIFEST.MF .\EditeurGraphe.jar *.* Rem : Fin de generation echo off cd .. 4. I want to run some use cases for test, using the command bellow, as explain in your documentation: java -classpath .;C:\Editeur_Graphe\instrumented;C:\Editeur_Graphe\executables;C:\Editeur_Graphe\sources -Dnet.sourceforge.cobertura.datafile=C:\Editeur_Graphe\cobertura.ser -jar EditeurGraphe.jar; I hope the instrumented application running, but I have the message Unable to access jar file ... For your information I have use your procedure with a simple .class it's OK, I can report coverage. Many thanks for your help. Best regards. Michel MAURICE |
From: John W. L. <Joh...@sa...> - 2010-07-08 01:21:14
|
I have applied the ignoreTrivial switch first. Please see the functional test I wrote that shows the details of what is considered trivial: http://cobertura.svn.sourceforge.net/viewvc/cobertura/trunk/cobertura/test/net/sourceforge/cobertura/test/IgnoreTrivialFunctionalTest.groovy?revision=729&view=markup Here is the relevant part: // trivial constructor public Main() { } // constructors that just call super() are trivial public Main(Thread t, String str) { super(str); } // constructors that just call super() are usually trivial, but // this constructor uses a constant, so it is considered non-trivial. public Main(Thread t, int i) { super("string"); } public Main(boolean bool) { // non-trivial conditional myint = bool ? 0 : 1; } public Main(int num) { // non-trivial switch switch(num) { default: } } public Main(String str) { // setting of statics is non-trivial mystatic = 2; } public Main(String str1, String str2) { // non-trivial method call privateMethod(); } public Main(String str1, int i) { // non-trivial object construction new StringBuffer(); } public Main(String str1, boolean bool) { // non-trivial this() call this(str1, 0); } // trivial getter public int getterTrivial() { return myint; } // trivial getter public boolean isBool() { return mybool; } // trivial getter public boolean hasBool() { return mybool; } // trivial setter public void setInt(int i) { myint = i; } // this would be trivial, but it is a getter that with no return value public void getVoid() { } // "empty" does not start with "get", "is", "has", or "set", so // it is considered non-trivial. private int empty() { return 0; } // this is a getter that takes a parameter, so it is non-trivial. public int getIntWithIntParm(int i) { return 0; } // this would be a trivial setter, but it does not have a parameter. public void set() { } // this would be a trivial setter, but it has more than one parameter. public void setIntWithTwoParms(int i, int j) { myint = i; } public int[][] getMultiDimArray() { // non-trivial construction of a multi-dimensional array return new int[1][1]; } public void setIncrement(int i) { // non-trivial increment of local variable i++; } public void setConst(String str) { /* * cause visitLdcInsn to be called because "str" is in the * runtime constant pool. An LDC operation is performed * which is considered non-trivial. */ System.out.println("str"); } public int[] getArray() { // causes visitIntInsn to be called. Creating an array is a "single int operand". // non-trivial. return new int[1]; } public Object getObject() { // causes visitTypeInsn to be called. Creating an object is a type instruction. // non-trivial. return new Object(); } public int getStatic() { // getting a static is non-trivial. return mystatic; } public void setStatic(int i) { // setting a static is non-trivial. mystatic = i; } // non-trivial local variable instruction (causes visitVarInsn(ISTORE)) (int store to local var) public void setISTORE(int i) { i = 0; } // non-trivial local variable instruction (causes visitVarInsn(LSTORE)) (long store to local var) public void setLSTORE(long l) { l = 0; } // non-trivial local variable instruction (causes visitVarInsn(FSTORE)) (floating store to local var) public void setFSTORE(float f) { f = 0; } // non-trivial local variable instruction (causes visitVarInsn(DSTORE)) (double store to local var) public void setDSTORE(double d) { d = 0; } // non-trivial local variable instruction (causes visitVarInsn(ASTORE)) (object store to local var) public void setASTORE(Object obj) { obj = null; } public void publicMethod() { } private void privateMethod() { } public static void staticMethod() { } // non-trivial public method call (causes visitMethodInsn(INVOKEVIRTUAL)) public int getINVOKEVIRTUAL() { publicMethod(); return 0; } // non-trivial private method call (causes visitMethodInsn(INVOKESPECIAL)) public int getINVOKESPECIAL() { privateMethod(); return 0; } // non-trivial static method call (causes visitMethodInsn(INVOKESTATIC)) public int getINVOKESTATIC() { staticMethod(); return 0; } // non-trivial interface method call (causes visitMethodInsn(INVOKEINTERFACE)) public void setINVOKEINTERFACE(MyInterface obj) { obj.myInterfaceMethod(); } -----Original Message----- From: Tad Smith [mailto:ts...@lw...] Sent: Wednesday, June 02, 2010 11:19 AM To: cob...@li... Subject: Re: [Cobertura-devel] Excluding Methods from coverage report I've uploaded my patch here: https://sourceforge.net/tracker/?func=detail&aid=3010530&group_id=130558&atid=720017 I've uploaded two versions of my patch. A normal diff patch output and a zip file that contains all changed files (and one new file). You can use whatever form is more convenient for you. Thanks, -- Tad ------------------------------------------------------------------------------ _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: John W. L. <Joh...@sa...> - 2010-07-07 14:31:18
|
Please see the last question in the FAQ. http://cobertura.sourceforge.net/faq.html -----Original Message----- From: Steven Christou [mailto:ste...@re...] Sent: Wednesday, July 07, 2010 9:51 AM To: cob...@li... Subject: [Cobertura-devel] Invoking Cobertura to report in source code Hello, In the product I am working on, we are doing a Process.destroy() which essentially destroys the JVM and does not allow for shutdown hooks to be ran. Since no shutdown hooks can be ran, cobertura fails to run and produce the results we want. I was wondering if there was a way we could have it produce results right before we do the call to the Process.destroy()? Thanks! Email Disclaimer: http://www.redprairie.com/emaildisclaimer/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Steven C. <ste...@re...> - 2010-07-07 14:16:02
|
Hello, In the product I am working on, we are doing a Process.destroy() which essentially destroys the JVM and does not allow for shutdown hooks to be ran. Since no shutdown hooks can be ran, cobertura fails to run and produce the results we want. I was wondering if there was a way we could have it produce results right before we do the call to the Process.destroy()? Thanks! Email Disclaimer: http://www.redprairie.com/emaildisclaimer/ |
From: Dan O. <dan...@gm...> - 2010-07-06 08:45:08
|
I'm using Cobertura for code coverage. The application has a lot of log statements and a frequent one is: if (log.isDebugEnabled()) { log.debug("some message " + someObject); } The problem is when I run Cobertura, it shows that not all the branches are covered. This is because when the tests are run the log is or on debug level or is not on debug level, so when the test is done, only one branch of the if statement is executed (then or else). A solution would be to duplicate the test methods and set the log on debug in the fisrt method, and on info in the second method. So all the branches of if statements with log.isDebugEnabled() will be covered. I feel this would be a workaround to the problem and I wonder if there is a way to configure Cobertura to avoid this. On the web page of Cobertura there is an example which uses <ignore regex="org.apache.log4j.*" /> in order to ignore all the log methods. I have tried this, but the line: if (log.isDebugEnabled()) is still red in the report, showing a 50% coverage. Do you know how to create the regular expression in order to ignore all the log methods from coverage reports and also the branches generated by if statements that have log.isDebugEnabled(). |
From: John W. L. <Joh...@sa...> - 2010-07-02 18:09:59
|
You can run <cobertura-instrument> and <cobertura-report> without running your tests in between. You can also use JavaNCSS directly. We use that to generate the complexity numbers. http://javancss.codehaus.org/ -----Original Message----- From: Qi Zhang [mailto:rog...@ya...] Sent: Friday, July 02, 2010 11:45 AM To: cob...@li... Subject: [Cobertura-devel] code complexity number Hi, I just need to collect the code complexity numbers of the classes in my project. Is there any way to generate the complexity numbers without executing the project? Thanks. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Marc P. <mpo...@ic...> - 2010-07-02 16:09:10
|
John, > Why couldn’t you use the File.lastModified() time of the cobertura.ser > file? > Actually I'm playing around with a pattern in the name of the file for the time being ;-) > On another note, I am a little concerned that future releases of Cobertura > may change the structure of what is in the cobertura.ser file. It is more > likely that backwards compatibility with the XML report is maintained. > I thing I understand your concern; one possibility could be to use some sort of "generic" data structure containing some meta-information about the instrumentation "run"; for example, an optional instance of JAVA Properties. The content of these properties could be populated using some mechanism with the <cobertura-instrument> task. Then, using these meta-information, we can build new dimensions for reporting purpose; for example we could track code coverage rates according to the SVN revision number, time, etc... Thanks for your attention, _marc |
From: Qi Z. <rog...@ya...> - 2010-07-02 15:45:10
|
Hi, I just need to collect the code complexity numbers of the classes in my project. Is there any way to generate the complexity numbers without executing the project? Thanks. |
From: Marc P. <mpo...@ic...> - 2010-07-02 15:40:57
|
John, I'm creating an OLAP cube to be able then to create my own reports with drilldown, slicing, etc... along different dimensions; so I'm not generating any XML reports. I could generate these XML files but the processing to get back the information (i.e., line + covered line) is not so easy as using the ProjectData class and it will be slower. That would be great to have that nice little 'timestamp' as a field of ProjectData ;-) _marc On Fri, Jul 2, 2010 at 8:42 PM, John W. Lewis <Joh...@sa...> wrote: > > Instead of using the cobertura.ser file directly, you could run an xml > report. There is a timestamp in it - the time the report ran. Would that > help? > > -----Original Message----- > From: mpo...@ic... [mailto:mpo...@ic...] > Sent: Thursday, July 01, 2010 10:03 PM > To: cob...@li... > Subject: [Cobertura-devel] historical report support > > Hello, > > I'm currently building an OLAP cube using directly the content of .ser > files (i.e., ProjectData) to create, amongst others, "historical reports". > > Unfortunately, I do not see any way to have some sort of "time serie" > information (e.g, time, SVN rep. number, or any property) within a .ser > file - that could be setup for example during ANT processing. > > Do you have any idea how to do that? > > Thanks, > _marc > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > |
From: John W. L. <Joh...@sa...> - 2010-07-02 14:46:39
|
Why couldn't you use the File.lastModified() time of the cobertura.ser file? On another note, I am a little concerned that future releases of Cobertura may change the structure of what is in the cobertura.ser file. It is more likely that backwards compatibility with the XML report is maintained. John From: mar...@cr... [mailto:mar...@cr...] On Behalf Of Marc Polizzi Sent: Friday, July 02, 2010 10:37 AM To: John W. Lewis Cc: cob...@li... Subject: Re: [Cobertura-devel] historical report support John, I'm creating an OLAP cube to be able then to create my own reports with drilldown, slicing, etc... along different dimensions; so I'm not generating any XML reports. I could generate these XML files but the processing to get back the information (i.e., line + covered line) is not so easy as using the ProjectData class and it will be slower. That would be great to have that nice little 'timestamp' as a field of ProjectData ;-) _marc On Fri, Jul 2, 2010 at 8:42 PM, John W. Lewis <Joh...@sa...<mailto:Joh...@sa...>> wrote: Instead of using the cobertura.ser file directly, you could run an xml report. There is a timestamp in it - the time the report ran. Would that help? -----Original Message----- From: mpo...@ic...<mailto:mpo...@ic...> [mailto:mpo...@ic...<mailto:mpo...@ic...>] Sent: Thursday, July 01, 2010 10:03 PM To: cob...@li...<mailto:cob...@li...> Subject: [Cobertura-devel] historical report support Hello, I'm currently building an OLAP cube using directly the content of .ser files (i.e., ProjectData) to create, amongst others, "historical reports". Unfortunately, I do not see any way to have some sort of "time serie" information (e.g, time, SVN rep. number, or any property) within a .ser file - that could be setup for example during ANT processing. Do you have any idea how to do that? Thanks, _marc ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first<http://sprint.com/first> -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: John W. L. <Joh...@sa...> - 2010-07-02 12:42:20
|
Instead of using the cobertura.ser file directly, you could run an xml report. There is a timestamp in it - the time the report ran. Would that help? -----Original Message----- From: mpo...@ic... [mailto:mpo...@ic...] Sent: Thursday, July 01, 2010 10:03 PM To: cob...@li... Subject: [Cobertura-devel] historical report support Hello, I'm currently building an OLAP cube using directly the content of .ser files (i.e., ProjectData) to create, amongst others, "historical reports". Unfortunately, I do not see any way to have some sort of "time serie" information (e.g, time, SVN rep. number, or any property) within a .ser file - that could be setup for example during ANT processing. Do you have any idea how to do that? Thanks, _marc ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: <mpo...@ic...> - 2010-07-02 02:03:31
|
Hello, I'm currently building an OLAP cube using directly the content of .ser files (i.e., ProjectData) to create, amongst others, "historical reports". Unfortunately, I do not see any way to have some sort of "time serie" information (e.g, time, SVN rep. number, or any property) within a .ser file - that could be setup for example during ANT processing. Do you have any idea how to do that? Thanks, _marc |
From: Jake C. <jak...@ga...> - 2010-06-29 21:32:33
|
I submitted a patch for this against 1.9.1 but it was not accepted: http://sourceforge.net/tracker/?func=detail&aid=2581839&group_id=130558&atid=720017 Since then I've maintained my own fork with additional bug fixes because a tool I work on uses this information. The patch is admittedly incomplete for general use because it does not update the reporting functionality. I'm considering revising my approach due to some limitations with getting listeners attached in some contexts (e.g. Maven) and re-implementing against the current version. I'd appreciate some feedback from the community. How much interest is there in this functionality making it into the mainline? What is the likelihood that it would be seriously considered for inclusion? What conditions would affect this? For example, if I were to provide the baseline implementation for tracking per-test data but not the reporting updates to display it, would that be automatic rejection or could the reporting part be updated after acceptance? -Jake On Tue, Jun 29, 2010 at 4:37 PM, John W. Lewis <Joh...@sa...> wrote: > > That is an interesting idea. > > Wouldn't you have to flush the data using saveGlobalProjectData() as > described in the FAQ before saving the ser file? > > It seems you also may want to keep a copy of the original ser file produced > by the instrumentation and have the cobertura.ser file reset back to the > original content after saving it. > > John > > > -----Original Message----- > From: Bennett, Jeffrey [mailto:JJB...@On...] > Sent: Tuesday, June 29, 2010 4:31 PM > To: John W. Lewis; unn...@ac...; > cob...@li... > Subject: RE: [Cobertura-devel] Cobertura Track the Junit that covers the > code > > In setUp() or tearDown(), you could copy the .SER file off to a unique > name. That would give you a .SER file per test which you could either > look at individually for really granular stuff, or aggregate to yield > coverage across the entire suite. > > -----Original Message----- > From: John W. Lewis [mailto:Joh...@sa...] > Sent: Tuesday, June 29, 2010 4:25 PM > To: unn...@ac...; cob...@li... > Subject: Re: [Cobertura-devel] Cobertura Track the Junit that covers the > code > > > Other than running the tests one by one - not really. > > -----Original Message----- > From: unn...@ac... > [mailto:unn...@ac...] > Sent: Monday, June 28, 2010 8:20 AM > To: cob...@li... > Subject: [Cobertura-devel] Cobertura Track the Junit that covers the > code > > Hi, > I downloaded cobertura-1.9.4.1. > Generated reports for my code base. > However I am unable to track which junit test has caused the code to > be marked as covered. > Any way to know which junit is covering which code? > > > Regards, > Unni Louis > Phone: +91-98451-57088 > AIM: UnniLS > > > > This message is for the designated recipient only and may contain > privileged, proprietary, or otherwise private information. If you have > received it in error, please notify the sender immediately and delete > the original. Any other use of the email by you is prohibited. > > ------------------------------------------------------------------------ > ------ > This SF.net email is sponsored by Sprint What will you do first with > EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > ------------------------------------------------------------------------ > ------ > This SF.net email is sponsored by Sprint What will you do first with > EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > |
From: John W. L. <Joh...@sa...> - 2010-06-29 20:37:36
|
That is an interesting idea. Wouldn't you have to flush the data using saveGlobalProjectData() as described in the FAQ before saving the ser file? It seems you also may want to keep a copy of the original ser file produced by the instrumentation and have the cobertura.ser file reset back to the original content after saving it. John -----Original Message----- From: Bennett, Jeffrey [mailto:JJB...@On...] Sent: Tuesday, June 29, 2010 4:31 PM To: John W. Lewis; unn...@ac...; cob...@li... Subject: RE: [Cobertura-devel] Cobertura Track the Junit that covers the code In setUp() or tearDown(), you could copy the .SER file off to a unique name. That would give you a .SER file per test which you could either look at individually for really granular stuff, or aggregate to yield coverage across the entire suite. -----Original Message----- From: John W. Lewis [mailto:Joh...@sa...] Sent: Tuesday, June 29, 2010 4:25 PM To: unn...@ac...; cob...@li... Subject: Re: [Cobertura-devel] Cobertura Track the Junit that covers the code Other than running the tests one by one - not really. -----Original Message----- From: unn...@ac... [mailto:unn...@ac...] Sent: Monday, June 28, 2010 8:20 AM To: cob...@li... Subject: [Cobertura-devel] Cobertura Track the Junit that covers the code Hi, I downloaded cobertura-1.9.4.1. Generated reports for my code base. However I am unable to track which junit test has caused the code to be marked as covered. Any way to know which junit is covering which code? Regards, Unni Louis Phone: +91-98451-57088 AIM: UnniLS This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. ------------------------------------------------------------------------ ------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel ------------------------------------------------------------------------ ------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Bennett, J. <JJB...@On...> - 2010-06-29 20:29:27
|
In setUp() or tearDown(), you could copy the .SER file off to a unique name. That would give you a .SER file per test which you could either look at individually for really granular stuff, or aggregate to yield coverage across the entire suite. -----Original Message----- From: John W. Lewis [mailto:Joh...@sa...] Sent: Tuesday, June 29, 2010 4:25 PM To: unn...@ac...; cob...@li... Subject: Re: [Cobertura-devel] Cobertura Track the Junit that covers the code Other than running the tests one by one - not really. -----Original Message----- From: unn...@ac... [mailto:unn...@ac...] Sent: Monday, June 28, 2010 8:20 AM To: cob...@li... Subject: [Cobertura-devel] Cobertura Track the Junit that covers the code Hi, I downloaded cobertura-1.9.4.1. Generated reports for my code base. However I am unable to track which junit test has caused the code to be marked as covered. Any way to know which junit is covering which code? Regards, Unni Louis Phone: +91-98451-57088 AIM: UnniLS This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. ------------------------------------------------------------------------ ------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel ------------------------------------------------------------------------ ------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: John W. L. <Joh...@sa...> - 2010-06-29 20:25:29
|
Other than running the tests one by one - not really. -----Original Message----- From: unn...@ac... [mailto:unn...@ac...] Sent: Monday, June 28, 2010 8:20 AM To: cob...@li... Subject: [Cobertura-devel] Cobertura Track the Junit that covers the code Hi, I downloaded cobertura-1.9.4.1. Generated reports for my code base. However I am unable to track which junit test has caused the code to be marked as covered. Any way to know which junit is covering which code? Regards, Unni Louis Phone: +91-98451-57088 AIM: UnniLS This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: <unn...@ac...> - 2010-06-28 12:51:22
|
Hi, I downloaded cobertura-1.9.4.1. Generated reports for my code base. However I am unable to track which junit test has caused the code to be marked as covered. Any way to know which junit is covering which code? Regards, Unni Louis Phone: +91-98451-57088 AIM: UnniLS This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. |
From: Schulze, D. <Dea...@ca...> - 2010-06-25 19:51:56
|
My bad. I had looked in the source distribution. Thanks. From: John W. Lewis [mailto:Joh...@sa...] Sent: Friday, June 25, 2010 12:55 PM To: Schulze, Dean; cob...@li... Subject: RE: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) The coberturaFlush.war executes code similar to the sample FAQ code, but it makes flushing the data more convenient for you. It is in the binary distribution: http://sourceforge.net/projects/cobertura/files/cobertura/1.9.4.1/cobert ura-1.9.4.1-bin.zip/download John From: Schulze, Dean [mailto:Dea...@ca...] Sent: Friday, June 25, 2010 2:12 PM To: John W. Lewis; cob...@li... Subject: RE: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) Where do I find the coberturaFlush.war? The FAQ has some sample code to flush the data, is that what you mean? From: John W. Lewis [mailto:Joh...@sa...] Sent: Friday, June 25, 2010 11:43 AM To: Schulze, Dean; cob...@li... Subject: RE: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I would deploy the coberturaFlush.war. Then, do an HTTP get on http://<HOST>:<PORT>/coberturaFlush/flushCobertura <http://%3cHOST%3e:%3cPORT%3e/coberturaFlush/flushCobertura> to flush the data. When that is finished, you can run the report. John From: Schulze, Dean [mailto:Dea...@ca...] Sent: Friday, June 25, 2010 1:06 PM To: cob...@li... Subject: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I build an instrumented .war file and run my system tests against the .war deployed in Tomcat to collect code coverage data. This works on Windows, but when I do it on Solaris I get the following error in catalina.out: Jun 25, 2010 10:30:54 AM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 Flushing results... Jun 25, 2010 10:30:54 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.util.Map$Entry. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1402) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at net.sourceforge.cobertura.coveragedata.countermaps.AtomicCounterMap.getF inalStateAndCleanIt(AtomicCounterMap.java:78) at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesOnProj ectData(TouchCollector.java:187) at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData (ProjectData.java:267) at net.sourceforge.cobertura.coveragedata.SaveTimer.run(SaveTimer.java:31) at java.lang.Thread.run(Thread.java:619) Flushing results done Cobertura: Loaded information on 52 classes. Cobertura: Saved information on 52 classes. I've tried this on both Tomcat 5.5.29 and Tomcat 6.0.26. The message above is from Tomcat 6.0.26. Tomcat 5.5.29 has a couple of additional lines: Jun 24, 2010 11:30:09 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load cobertura.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Here's a post from someone else who has seen this: http://old.nabble.com/cobertura-and-tomcat5.5-td16905413.html The line coverage on Window is 59% while on Solaris the same tests show only 16% coverage. The JUnit results show that all system tests ran successfully on both platforms. It looks like what is happening on Solaris is that when Tomcat shuts down (and updates the cobertura.ser file with the coverage results) that this exceptions prevents a full update of the .ser file. Is this these a work-around for this? Thanks. Dean |
From: John W. L. <Joh...@sa...> - 2010-06-25 18:55:10
|
The coberturaFlush.war executes code similar to the sample FAQ code, but it makes flushing the data more convenient for you. It is in the binary distribution: http://sourceforge.net/projects/cobertura/files/cobertura/1.9.4.1/cobertura-1.9.4.1-bin.zip/download John From: Schulze, Dean [mailto:Dea...@ca...] Sent: Friday, June 25, 2010 2:12 PM To: John W. Lewis; cob...@li... Subject: RE: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) Where do I find the coberturaFlush.war? The FAQ has some sample code to flush the data, is that what you mean? From: John W. Lewis [mailto:Joh...@sa...] Sent: Friday, June 25, 2010 11:43 AM To: Schulze, Dean; cob...@li... Subject: RE: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I would deploy the coberturaFlush.war. Then, do an HTTP get on http://<HOST>:<PORT>/coberturaFlush/flushCobertura<http://%3cHOST%3e:%3cPORT%3e/coberturaFlush/flushCobertura> to flush the data. When that is finished, you can run the report. John From: Schulze, Dean [mailto:Dea...@ca...] Sent: Friday, June 25, 2010 1:06 PM To: cob...@li... Subject: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I build an instrumented .war file and run my system tests against the .war deployed in Tomcat to collect code coverage data. This works on Windows, but when I do it on Solaris I get the following error in catalina.out: Jun 25, 2010 10:30:54 AM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 Flushing results... Jun 25, 2010 10:30:54 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.util.Map$Entry. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1402) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at net.sourceforge.cobertura.coveragedata.countermaps.AtomicCounterMap.getFinalStateAndCleanIt(AtomicCounterMap.java:78) at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesOnProjectData(TouchCollector.java:187) at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData(ProjectData.java:267) at net.sourceforge.cobertura.coveragedata.SaveTimer.run(SaveTimer.java:31) at java.lang.Thread.run(Thread.java:619) Flushing results done Cobertura: Loaded information on 52 classes. Cobertura: Saved information on 52 classes. I've tried this on both Tomcat 5.5.29 and Tomcat 6.0.26. The message above is from Tomcat 6.0.26. Tomcat 5.5.29 has a couple of additional lines: Jun 24, 2010 11:30:09 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load cobertura.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Here's a post from someone else who has seen this: http://old.nabble.com/cobertura-and-tomcat5.5-td16905413.html The line coverage on Window is 59% while on Solaris the same tests show only 16% coverage. The JUnit results show that all system tests ran successfully on both platforms. It looks like what is happening on Solaris is that when Tomcat shuts down (and updates the cobertura.ser file with the coverage results) that this exceptions prevents a full update of the .ser file. Is this these a work-around for this? Thanks. Dean |
From: Schulze, D. <Dea...@ca...> - 2010-06-25 18:11:59
|
Where do I find the coberturaFlush.war? The FAQ has some sample code to flush the data, is that what you mean? From: John W. Lewis [mailto:Joh...@sa...] Sent: Friday, June 25, 2010 11:43 AM To: Schulze, Dean; cob...@li... Subject: RE: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I would deploy the coberturaFlush.war. Then, do an HTTP get on http://<HOST>:<PORT>/coberturaFlush/flushCobertura <http://%3cHOST%3e:%3cPORT%3e/coberturaFlush/flushCobertura> to flush the data. When that is finished, you can run the report. John From: Schulze, Dean [mailto:Dea...@ca...] Sent: Friday, June 25, 2010 1:06 PM To: cob...@li... Subject: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I build an instrumented .war file and run my system tests against the .war deployed in Tomcat to collect code coverage data. This works on Windows, but when I do it on Solaris I get the following error in catalina.out: Jun 25, 2010 10:30:54 AM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 Flushing results... Jun 25, 2010 10:30:54 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.util.Map$Entry. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1402) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at net.sourceforge.cobertura.coveragedata.countermaps.AtomicCounterMap.getF inalStateAndCleanIt(AtomicCounterMap.java:78) at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesOnProj ectData(TouchCollector.java:187) at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData (ProjectData.java:267) at net.sourceforge.cobertura.coveragedata.SaveTimer.run(SaveTimer.java:31) at java.lang.Thread.run(Thread.java:619) Flushing results done Cobertura: Loaded information on 52 classes. Cobertura: Saved information on 52 classes. I've tried this on both Tomcat 5.5.29 and Tomcat 6.0.26. The message above is from Tomcat 6.0.26. Tomcat 5.5.29 has a couple of additional lines: Jun 24, 2010 11:30:09 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load cobertura.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Here's a post from someone else who has seen this: http://old.nabble.com/cobertura-and-tomcat5.5-td16905413.html The line coverage on Window is 59% while on Solaris the same tests show only 16% coverage. The JUnit results show that all system tests ran successfully on both platforms. It looks like what is happening on Solaris is that when Tomcat shuts down (and updates the cobertura.ser file with the coverage results) that this exceptions prevents a full update of the .ser file. Is this these a work-around for this? Thanks. Dean |
From: John W. L. <Joh...@sa...> - 2010-06-25 17:43:31
|
I would deploy the coberturaFlush.war. Then, do an HTTP get on http://<HOST>:<PORT>/coberturaFlush/flushCobertura<http://%3cHOST%3e:%3cPORT%3e/coberturaFlush/flushCobertura> to flush the data. When that is finished, you can run the report. John From: Schulze, Dean [mailto:Dea...@ca...] Sent: Friday, June 25, 2010 1:06 PM To: cob...@li... Subject: [Cobertura-devel] Cobertura problems on Solaris (code coverage in a .war file) I build an instrumented .war file and run my system tests against the .war deployed in Tomcat to collect code coverage data. This works on Windows, but when I do it on Solaris I get the following error in catalina.out: Jun 25, 2010 10:30:54 AM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 Flushing results... Jun 25, 2010 10:30:54 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.util.Map$Entry. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1402) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at net.sourceforge.cobertura.coveragedata.countermaps.AtomicCounterMap.getFinalStateAndCleanIt(AtomicCounterMap.java:78) at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesOnProjectData(TouchCollector.java:187) at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData(ProjectData.java:267) at net.sourceforge.cobertura.coveragedata.SaveTimer.run(SaveTimer.java:31) at java.lang.Thread.run(Thread.java:619) Flushing results done Cobertura: Loaded information on 52 classes. Cobertura: Saved information on 52 classes. I've tried this on both Tomcat 5.5.29 and Tomcat 6.0.26. The message above is from Tomcat 6.0.26. Tomcat 5.5.29 has a couple of additional lines: Jun 24, 2010 11:30:09 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load cobertura.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Here's a post from someone else who has seen this: http://old.nabble.com/cobertura-and-tomcat5.5-td16905413.html The line coverage on Window is 59% while on Solaris the same tests show only 16% coverage. The JUnit results show that all system tests ran successfully on both platforms. It looks like what is happening on Solaris is that when Tomcat shuts down (and updates the cobertura.ser file with the coverage results) that this exceptions prevents a full update of the .ser file. Is this these a work-around for this? Thanks. Dean |
From: Schulze, D. <Dea...@ca...> - 2010-06-25 17:06:40
|
I build an instrumented .war file and run my system tests against the .war deployed in Tomcat to collect code coverage data. This works on Windows, but when I do it on Solaris I get the following error in catalina.out: Jun 25, 2010 10:30:54 AM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 Flushing results... Jun 25, 2010 10:30:54 AM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load java.util.Map$Entry. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1402) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader .java:1361) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at net.sourceforge.cobertura.coveragedata.countermaps.AtomicCounterMap.getF inalStateAndCleanIt(AtomicCounterMap.java:78) at net.sourceforge.cobertura.coveragedata.TouchCollector.applyTouchesOnProj ectData(TouchCollector.java:187) at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData (ProjectData.java:267) at net.sourceforge.cobertura.coveragedata.SaveTimer.run(SaveTimer.java:31) at java.lang.Thread.run(Thread.java:619) Flushing results done Cobertura: Loaded information on 52 classes. Cobertura: Saved information on 52 classes. I've tried this on both Tomcat 5.5.29 and Tomcat 6.0.26. The message above is from Tomcat 6.0.26. Tomcat 5.5.29 has a couple of additional lines: Jun 24, 2010 11:30:09 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load cobertura.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. Here's a post from someone else who has seen this: http://old.nabble.com/cobertura-and-tomcat5.5-td16905413.html The line coverage on Window is 59% while on Solaris the same tests show only 16% coverage. The JUnit results show that all system tests ran successfully on both platforms. It looks like what is happening on Solaris is that when Tomcat shuts down (and updates the cobertura.ser file with the coverage results) that this exceptions prevents a full update of the .ser file. Is this these a work-around for this? Thanks. Dean |
From: John W. L. <Joh...@sa...> - 2010-06-25 16:07:19
|
Usually 0% coverage is usually due to the test process not using the cobertura.ser file created at instrumentation time. Make sure the test process’ working directory has the cobertura.ser file in it, or pass the net.sourceforge.cobertura.datafile system property to the test process with the location of the cobertura.ser file. John From: Bill Hansley [mailto:han...@mc...] Sent: Friday, June 25, 2010 10:12 AM To: Jake Cobb Cc: cob...@li... Subject: Re: [Cobertura-devel] Instrument task misses classes, tests die as a result Jake, I’ve tried it both ways. Classpath for test exec: … /var/cruise/hudson/home/jobs/requestor-trunk/workspace/trunk/work/test: /var/cruise/hudson/home/jobs/requestor-trunk/workspace/trunk/test: /var/cruise/hudson/home/jobs/requestor-trunk/workspace/trunk/work/test/instrumented: If the if the instrumented version is first or second, cobertura runs and all test coverage shows 0%. Thanks, Bill Hansley ____________________________ Duke University Health System DHTS Perioperative Services Manager, Development Team 10018 Hock Plaza w) 919.668.1388 f) 919.668.5568 From: jak...@gm... [mailto:jak...@gm...] On Behalf Of Jake Cobb Sent: Friday, June 25, 2010 10:04 AM To: Bill Hansley Cc: cob...@li... Subject: Re: [Cobertura-devel] Instrument task misses classes, tests die as a result When you included both directories on the classpath, did you have the non-instrumented folder come first? If so, try putting the instrumented dir first so any classes present in both will load the instrumented version. -Jake 2010/6/25 Bill Hansley <han...@mc...<mailto:han...@mc...>> Hi, I’m a newbie to Cobertura, and am having trouble getting it to work completely from start to finish. Starting from the end, here’s the error I’m getting: java.lang.reflect.InvocationTargetException Caused by: java.lang.NoClassDefFoundError: edu/duke/dhts/periop/requestOR/persistence/broker/PersistenceBroker$PerformWithHibernateSession at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at suite.edu.duke.dhts.periop.requestOR.AllHibernateTests.suite(AllHibernateTests.java:32) at suite.edu.duke.dhts.periop.requestOR.AllTests.suite(AllTests.java:19) Caused by: java.lang.ClassNotFoundException: edu.duke.dhts.periop.requestOR.persistence.broker.PersistenceBroker$PerformWithHibernateSession at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) The class it can’t find (PersistenceBroker$PerformWithHibernateSession) is in my classes directory, but when instrument runs via ant, using this task: <target name="cobertura-tag-classes"> <delete file="cobertura.ser" /> <cobertura-instrument todir="${classes.instrumented}"> <ignore regex="org.apache.log4j.*" /> <fileset dir="${classes}"> <include name="**/*.class" /> </fileset> </cobertura-instrument> </target> The log file says it runs successfully: cobertura-tag-classes: [delete] Deleting: /var/cruise/hudson/home/jobs/requestor-trunk/workspace/trunk/cobertura.ser [cobertura-instrument] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file [cobertura-instrument] Instrumenting 187 files to /var/cruise/hudson/home/jobs/requestor-trunk/workspace/trunk/work/test/instrumented [cobertura-instrument] Cobertura: Saved information on 187 classes. [cobertura-instrument] Instrument time: 1982ms Yet, when I go to execute my tests, I get this: java.lang.reflect.InvocationTargetException Caused by: java.lang.NoClassDefFoundError: edu/duke/dhts/periop/requestOR/persistence/broker/PersistenceBroker$PerformWithHibernateSession at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at suite.edu.duke.dhts.periop.requestOR.AllHibernateTests.suite(AllHibernateTests.java:32) at suite.edu.duke.dhts.periop.requestOR.AllTests.suite(AllTests.java:19) Caused by: java.lang.ClassNotFoundException: edu.duke.dhts.periop.requestOR.persistence.broker.PersistenceBroker$PerformWithHibernateSession at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) PersistenceBroker$PerformWithHibernateSession is in my original classes directory, but not in the instrumented classes directory. I can get Cobertura to run to completion by including my non-instrumented classes in the test run path, but everything comes up 0%. If I remove my non-instrumented classes, it dies trying to run the test with the exception above. Setup: Java: 1.6.0_14-b08 Cobertura: 1.9.4.1 Ant: 1.7.1 Hudson: 1.363 Any advice? Thanks, Bill Hansley ____________________________ Duke University Health System DHTS Perioperative Services Manager, Development Team 10018 Hock Plaza w) 919.668.1388 f) 919.668.5568 ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel |