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: *** F. S. Kumar*** <nsa...@gm...> - 2012-07-29 21:27:21
|
John: I follow below steps to create my code coverage report. In the reports, i see over all* 4%* coverage report and sometimes get *12%* coverage. This is not very promising to me. I think i may miss some process. Please take a look and help me. *Steps in my code coverage.* 1) After i instrument my jars, i see original cobertura.ser file getting generated. 2) I copied the cobertura.ser file to my working directory *C:\WorkingDir*. 3) From this working directory, i launch my client application (with instrumented EAR already deployed, up and running on AIX server ) using a batch file that brings my application running. 4) Then I start my automation testing using QTP. 5) As soon as my automation finish testing, I close my client application and i see cobertura.ser file in my working directory * C:\WorkingDir* is getting updated with latest time stamp. 6) File size of original cobertura.ser and updated cobertura.ser is same, but with updated time stamp. 7) I grab this latest updated cobertura.ser file to create my reports. And i see over all* 4%* coverage report and sometimes get *12%* coverage. We are expecting at least more than 60% coverage at this time. *Am i using the correct cobertura.ser file for generating coverage report?.* Or from the cobertura document at below link, http://cobertura.sourceforge.net/faq.html , under heading *Using Cobertura with a Web Application*, i read the following. After deploy the war file into your application server (Tomcat, JBoss, WebLogic, WebSphere, etc). and run your tests. will create a "cobertura.ser" file on the disk. You may need to dig around a bit to find it. Cobertura puts this file in what it considers to be the current working directory. Typically this is the directory that the application server was started from (for example, C:\Tomcat\bin). *I have below questions.* a) Is this means, another cobertura.ser file will be getting created on the *AIX server ( this is the server my application is running)* running in an external server box directory apart from the cobertura.ser file getting created in my local *C:\WorkingDir* .? And do i need to go to server, stop the server and grab another cobertura.ser and merge with cobertura.ser created on my working directory and use in my report generation. to get good coverage report? b) Or there is only one cobertura.ser file will be created over all, that is only in *C:\WorkingDir, *that * *i need to use in coverage report to see good code coverage results.? This is very confusing to me. Your inputs or any body from the groups have any pointers, suggestions will be of great help. Thank you. Sakthi. On Thu, Jul 26, 2012 at 12:03 AM, *** From Sakthivel Kumar*** < nsa...@gm...> wrote: > John: > > As you mentioned in your below notes, after instrumentation, I fully > searched my C drive, i do not see a cobertura.ser file that is created > after code instrumentation is done. > Below is the BuildInstument.Xml i used to for code instrumentation. Please > take a look and let me know if something is wrong. Also provide me a sample > working instrument build file that creates cobertura.ser file. > > I appreciate your help and time. > > Thanks in advance > Sakthi > > <?xml version="1.0" encoding="UTF-8"?> > > <project name="cobertura.examples.basic" default="InstrumentQReads" > basedir="."> > > <description> > Cobertura - http://cobertura.sourceforge.net/ > </description> > > <property file="build.properties" /> > > > <!-- cobertura task definition --> > <path id="cobertura.classpath"> > <fileset dir="${cobertura.dir}"> > <include name="cobertura.jar" /> > <include name="lib/**/*.jar" /> > </fileset> > </path> > > <taskdef classpathref="cobertura.classpath" > resource="tasks.properties"/> > > > <target name="init"> > <echo message="MHD: Inside ... init of InstrumentQReads..."/> > <mkdir dir="${classes.dir}" /> > <mkdir dir="${instrumented.dir}" /> > <echo message="MHD: Done... init of InstrumentQReads."/> > </target> > > > <target name="compile" depends="init"> > <echo message="MHD: Inside ... compile of InstrumentQReads..."/> > <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" > debuglevel="vars,lines,source" > > <classpath refid="cobertura.classpath" /> > </javac> > <echo message="MHD: Done... compile of InstrumentQReads..."/> > </target> > > <target name="instrument" depends="init,compile" > > <echo message="MHD: Doing instrumentation for jar files."/> > <!-- > Remove the coverage data file and any old instrumentation. > --> > <delete file="cobertura.ser"/> > > <!-- delete dir="${instrumented.dir}" / --> > > <!-- > Instrument the application jars, writing the instrumented > jars, in to ${build.instrumented.dir}. > --> > > <cobertura-instrument datafile="${reports.dir}/basic_coverage.ser" > todir="${instrumented.dir}"> > <!-- The following line causes instrument to ignore any source > line containing a reference to log4j, for the purposes of coverage > reporting.--> > <ignore regex="org.apache.log4j.*" /> > > <fileset dir="${jars.dir}"> > <include name="**/*.jar" /> > </fileset> > </cobertura-instrument> > <echo message="MHD: done instrumentation of jar Files."/> > </target> > > <target name="test" depends="init,compile"> > > <junit fork="yes" dir="${basedir}" failureProperty="test.failed"> > <!-- > Specify the name of the coverage data file to use. > The value specified below is the default. > --> > <sysproperty key="net.sourceforge.cobertura.datafile" > file="${basedir}/cobertura.ser" /> > > <!-- > Note the classpath order: instrumented classes are before > the > original (uninstrumented) classes. This is important. > --> > > <classpath location="${instrumented.dir}" /> > > <!-- > The instrumented classes reference classes used by the > Cobertura runtime, so Cobertura and its dependencies > must be on your classpath. > > > <classpath refid="cobertura_classpath" /> > > <formatter type="xml" /> > <test name="${testcase}" todir="${reports.xml.dir}" if="testcase" /> > <batchtest todir="${reports.xml.dir}" unless="testcase"> > <fileset dir="${src.dir}"> > <include name="**/*Test.java" /> > </fileset> > </batchtest> > > --> > > </junit> > > </target> > > > <target name="InstrumentQReads" depends="instrument,compile,test" > description="Compile and instrument QReads jar files."/> > > </project> > > > On Thu, May 24, 2012 at 11:16 AM, John W. Lewis <Joh...@sa...>wrote: > >> ** ** >> >> That almost always means that your tests are not using the cobertura.ser >> file that is created during the instrumentation. You have to make sure >> that the cobertura.ser file is moved to the working directory of your >> tests, or use the cobertura property (as described in the Cobertura Ant >> documentation) to point to the cobertura.ser file.**** >> >> ** ** >> >> ** ** >> >> *From:* Ionel Pagu [mailto:Ion...@te...] >> *Sent:* Thursday, May 24, 2012 11:54 AM >> *To:* cob...@li... >> *Subject:* [Cobertura-devel] coverage not reported properly on the main >> page**** >> >> ** ** >> >> Hi,**** >> >> **** >> >> After tweaking the ant scripts a bit, I was now able to instrument, run >> our jUnits and then run the report successfully. However, there is one odd >> thing: in the main report page, the coverage is reported as 100% everywhere >> but I know our jUnits are not that good. Even further, if I click the links >> to check source code I can clearly see code not being (fully) covered. So >> now I am puzzled. The tools seems to detect that properly but not summarize >> it correctly.**** >> >> **** >> >> Any idea?**** >> >> **** >> >> Thanks,**** >> >> *Ionel Pagu***** >> >> The information in this e-mail is confidential and may be legally >> privileged. >> It is intended solely for the addressee. Access to this e-mail by anyone >> else is unauthorized. **** >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cobertura-devel mailing list >> Cob...@li... >> https://lists.sourceforge.net/lists/listinfo/cobertura-devel >> >> > > > -- > Thanks and Best Regards > > Sakthivel Kumar > > nsa...@gm... > -- Thanks and Best Regards Sakthivel Kumar nsa...@gm... |
From: *** F. S. Kumar*** <nsa...@gm...> - 2012-07-29 14:01:30
|
Hi Alex: Have you resolved your issue now with regards to your below notes? If not, can you explain me how you created a WAR file with the instrumented code and deployed in to your JBoss server ? I encountered similar issues in my project and resolved. Basically, your un-insturmented WAR file and your instrumented WAR file should be identical in structure before depolyment to your server. In your case, i think, they are not identical. If they are not identical, then your deployment may succeed, but your application may not open. You need to compare your WAR files ( insturmented with non-instrumented) by using a tool like Tugzip ( free software) and make sure they are identical in file structure. Sizes of instrumented files should be greater then the un-instrumented files. If you see a difference in both of your WAR files, then you are missing something in your Un_insturmented WAR file. Add missing files and make new WAR identical to your original WAR files and deploy to server. You should not have problem now. Hope this helps. Thanks Sakthi On Thu, May 31, 2012 at 2:23 PM, Alexander Jeyaraj <aje...@gm...>wrote: > Hi All, > > I am instrumenting war file that contains EJBs, and deploying to JBoss7. > When deploying non-instrumented file, all works fine. When deploying > instrumented file, > I am getting error > No EJB found with interface of type 'com.xxx.ProducerBean' for binding > com.xxx.ConsumerBean/_producer' > > The com.xxx.ProducerBean is defined as > @Stateless > public class CouchBaseHelperBean { > public void someMethod(); > } > > The bean that uses the ProducerBean is defined as > @Stateless > public class ConsumerBean implements ConsumerBeanLocal { > > @EJB > ProducerBean _producer; > public void someOtherMethod() > } > > Any idea what is causing this, and how to resolve this. I am really stuck > on this for a while now, and any help is greatly appreciated. > > Thanks, > Alex. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > -- Thanks and Best Regards Sakthivel Kumar nsa...@gm... |
From: *** F. S. Kumar*** <nsa...@gm...> - 2012-07-27 20:22:12
|
John: Below is my coverage report result. *Coverage Report - All Packages* *All Packages * *# Classes - 574, Line Coverage - 4%, Branch Coverage - 2% amd Complexity - 3.64* ** Some this is wrong in my report generation process and i expecting at least more than *60% code coveage* at this point. *Issue 2:* I have another issue while merging 2 cobertura.ser files. Below is my scenario. ** I need to merge couple of cobertura.ser files. First file size is - 4.6MB Second file size is - 2.2 MB I have below build file to merge them. After executing below build file successfully, i see one *cobertura.ser* file created in my C drive as expected , but the file size is *same* as first file size and *not* total of * 4.6 + 2.2 = 6.8 MB* Is my merge build is correct or missing anything in build file.? Is there any other way or tool available to merge two or more cobertura.ser files in to one file, apart from using cobertura merge task? <?xml version="1.0" encoding="UTF-8"?> <project name="cobertura.examples.basic" default="CoberturaMerge" basedir="."> <description> Cobertura - http://cobertura.sourceforge.net/ </description> <property file="build.properties" /> <path id="cobertura.classpath"> <fileset dir="${cobertura.dir}"> <include name="cobertura.jar" /> <include name="lib/**/*.jar" /> </fileset> </path> <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> <target name="merge" > <cobertura-merge > <fileset dir="${allcoberturafiles.dir}"> <include name="**/cobertura.ser"/> </fileset> </cobertura-merge> </target> <target name="CoberturaMerge" depends="merge" description="Used to merge two cobertura.ser files in to one and use this file in coveage report."/> </project> Thanks. Sakthi Package # Classes Line Coverage<file:///C:/reports/cobertura-html/help.html> Branch Coverage <file:///C:/reports/cobertura-html/help.html> Complexity<file:///C:/reports/cobertura-html/help.html> *All Packages* 574 4% 3357/80263 2% 798/32579 3.64712202609363;3.647 Package # Classes Line Coverage<file:///C:/reports/cobertura-html/help.html> Branch Coverage <file:///C:/reports/cobertura-html/help.html> Complexity<file:///C:/reports/cobertura-html/help.html> *All Packages* 574 4% 3357/80263 2% 798/32579 3.64712202609363;3.647 *All Packages* 574 On Fri, Jul 27, 2012 at 1:33 PM, John W. Lewis <Joh...@sa...> wrote: > ** ** > > It should be the same size. Remember that an integer is the same size in > memory (or on disk) whether it is a big number or a large number.**** > > ** ** > > The timestamp should be updated. I am almost certain that is true since > you mention seeing the lock file.**** > > ** ** > > What does your report look like?**** > > ** ** > > John**** > > ** ** > > ** ** > > *From:* *** From Sakthivel Kumar*** [mailto:nsa...@gm...] > *Sent:* Friday, July 27, 2012 2:28 PM > *To:* John W. Lewis > *Cc:* cob...@li... > *Subject:* My orignial cobertura.ser is not getting updated after server > shut down and seeing "cobertura.ser.Lock" for a second.**** > > ** ** > > John:**** > > **** > > Thanks for your valuable inputs and time.**** > > As you mentioned i copied the cobertura.ser file to the same location my > your application produces the cobertura.ser file. **** > > As soon as is finished testing and server shut down, i see > "cobertura.ser.Lock" getting created for a second and vanishes. The > orignial cobertura.ser is not getting updated. Still same size after > testing is done.**** > > **** > > I have caputred the logs after shutting down my server. Below is the logs. > Please take a look and let me know why original cobertura.ser file is not > getting updated after server shut down and why there is a > "cobertura.ser.Lock" getting created for a second and vanishes.**** > > **** > > Lib is getting loaded from PegJniKit interface > The java.vendor property is Sun Microsystems Inc. > The os.name property is Windows XP > The java.version property is 1.6.0_29 > Is Java 2 Platform? true > The java library path is: . > Windows SUN's virtual machine loaded > 13:12:37:913 >> Loading HP QuickTest Professional Java Support (version > 11.0.0.0) (SUN 1.6.0_29) > 13:12:38:273 >> ========= Mercury Interactive Class Loaders ========= > 13:12:38:273 >> com.mercury.ftjadin.infra.CSClassLoaderJava2@12884e0 on > top of sun.misc.Launcher$AppClassLoader@f4a24a > 13:12:38:273 >> ========================================= > Flushing results... > Flushing results done > Cobertura: Loaded information on 404 classes. > Cobertura: Saved information on 404 classes. > 13:20:33:712 >> DEBUG >> Releasing all waiters. There are 0 waiters > active. > RPC Name : \pipe\RPCQReads5_1343412758304 > In DATA_HANDLE_TYPE_SERVER_bind**** > > Reached the end of function**** > > Thanks**** > > Sakthi.**** > > **** > > **** > > ** ** > > On Fri, Jul 27, 2012 at 10:33 AM, John W. Lewis <Joh...@sa...> > wrote:**** > > **** > > The instrumentation produces a cobertura.ser file. That same file should > be used during your testing. One way of doing this is to copy the > cobertura.ser file to the same location where your application produces the > cobertura.ser file.**** > > **** > > **** > > *From:* *** From Sakthivel Kumar*** [mailto:nsa...@gm...] > *Sent:* Wednesday, July 25, 2012 6:50 PM > *To:* cob...@li... > *Subject:* [Cobertura-devel] My percentage code coverage as 100%. Not > sure why cobertura.ser file is not properly created and this file size is > very small.**** > > **** > > Hello cobertura Group.**** > > Good evening.**** > > When i tried to generate code coverage using Cobertura tool, i see my > percentage code coverage as 100% in my report. Before running my tests, i > delete the existing cobertura.ser file and after running test each time, i > can see a latest cobertura.ser file is getting generated. The cobertura.ser > file generated is small in size less than 200 KB. And i am using this > latest cobertura.ser file to generate coverage report. I did not know what > is causing to give 100% code coverage report. But i expect to see the size > of cobertura.ser file generated should be bigger.**** > > **** > > Below is the steps how i did my code coverage. > a) Instrumented my EAR files and deployed to server b) Accessed my > application in the server c) latest cobertura.ser file got generated. 4) > Picked up the latest cobertura.ser file and used in my report coverage > build to generate reports. In the reports directory, when i checked the > index.html i can see 100% code coverage.**** > > **** > > Is there any other steps i am missing.? Please take a look and help me. > I appreciate your help.**** > > Thanks > Sakthivel > nsa...@gm...**** > > > > > -- > Thanks and Best Regards > > Sakthivel Kumar > > nsa...@gm...**** > -- Thanks and Best Regards Sakthivel Kumar nsa...@gm... |
From: John W. L. <Joh...@sa...> - 2012-07-27 18:33:30
|
It should be the same size. Remember that an integer is the same size in memory (or on disk) whether it is a big number or a large number. The timestamp should be updated. I am almost certain that is true since you mention seeing the lock file. What does your report look like? John From: *** From Sakthivel Kumar*** [mailto:nsa...@gm...] Sent: Friday, July 27, 2012 2:28 PM To: John W. Lewis Cc: cob...@li... Subject: My orignial cobertura.ser is not getting updated after server shut down and seeing "cobertura.ser.Lock" for a second. John: Thanks for your valuable inputs and time. As you mentioned i copied the cobertura.ser file to the same location my your application produces the cobertura.ser file. As soon as is finished testing and server shut down, i see "cobertura.ser.Lock" getting created for a second and vanishes. The orignial cobertura.ser is not getting updated. Still same size after testing is done. I have caputred the logs after shutting down my server. Below is the logs. Please take a look and let me know why original cobertura.ser file is not getting updated after server shut down and why there is a "cobertura.ser.Lock" getting created for a second and vanishes. Lib is getting loaded from PegJniKit interface The java.vendor property is Sun Microsystems Inc. The os.name<http://os.name> property is Windows XP The java.version property is 1.6.0_29 Is Java 2 Platform? true The java library path is: . Windows SUN's virtual machine loaded 13:12:37:913 >> Loading HP QuickTest Professional Java Support (version 11.0.0.0) (SUN 1.6.0_29) 13:12:38:273 >> ========= Mercury Interactive Class Loaders ========= 13:12:38:273 >> com.mercury.ftjadin.infra.CSClassLoaderJava2@12884e0<mailto:com.mercury.ftjadin.infra.CSClassLoaderJava2@12884e0> on top of sun.misc.Launcher$AppClassLoader@f4a24a<mailto:sun.misc.Launcher$AppClassLoader@f4a24a> 13:12:38:273 >> ========================================= Flushing results... Flushing results done Cobertura: Loaded information on 404 classes. Cobertura: Saved information on 404 classes. 13:20:33:712 >> DEBUG >> Releasing all waiters. There are 0 waiters active. RPC Name : \pipe\RPCQReads5_1343412758304 In DATA_HANDLE_TYPE_SERVER_bind Reached the end of function Thanks Sakthi. On Fri, Jul 27, 2012 at 10:33 AM, John W. Lewis <Joh...@sa...<mailto:Joh...@sa...>> wrote: The instrumentation produces a cobertura.ser file. That same file should be used during your testing. One way of doing this is to copy the cobertura.ser file to the same location where your application produces the cobertura.ser file. From: *** From Sakthivel Kumar*** [mailto:nsa...@gm...<mailto:nsa...@gm...>] Sent: Wednesday, July 25, 2012 6:50 PM To: cob...@li...<mailto:cob...@li...> Subject: [Cobertura-devel] My percentage code coverage as 100%. Not sure why cobertura.ser file is not properly created and this file size is very small. Hello cobertura Group. Good evening. When i tried to generate code coverage using Cobertura tool, i see my percentage code coverage as 100% in my report. Before running my tests, i delete the existing cobertura.ser file and after running test each time, i can see a latest cobertura.ser file is getting generated. The cobertura.ser file generated is small in size less than 200 KB. And i am using this latest cobertura.ser file to generate coverage report. I did not know what is causing to give 100% code coverage report. But i expect to see the size of cobertura.ser file generated should be bigger. Below is the steps how i did my code coverage. a) Instrumented my EAR files and deployed to server b) Accessed my application in the server c) latest cobertura.ser file got generated. 4) Picked up the latest cobertura.ser file and used in my report coverage build to generate reports. In the reports directory, when i checked the index.html i can see 100% code coverage. Is there any other steps i am missing.? Please take a look and help me. I appreciate your help. Thanks Sakthivel nsa...@gm...<mailto:nsa...@gm...> -- Thanks and Best Regards Sakthivel Kumar nsa...@gm...<mailto:nsa...@gm...> |
From: *** F. S. Kumar*** <nsa...@gm...> - 2012-07-27 18:27:49
|
John: Thanks for your valuable inputs and time. As you mentioned i copied the cobertura.ser file to the same location my your application produces the cobertura.ser file. As soon as is finished testing and server shut down, i see "cobertura.ser.Lock" getting created for a second and vanishes. The orignial cobertura.ser is not getting updated. Still same size after testing is done. I have caputred the logs after shutting down my server. Below is the logs. Please take a look and let me know why original cobertura.ser file is not getting updated after server shut down and why there is a "cobertura.ser.Lock" getting created for a second and vanishes. Lib is getting loaded from PegJniKit interface The java.vendor property is Sun Microsystems Inc. The os.name property is Windows XP The java.version property is 1.6.0_29 Is Java 2 Platform? true The java library path is: . Windows SUN's virtual machine loaded 13:12:37:913 >> Loading HP QuickTest Professional Java Support (version 11.0.0.0) (SUN 1.6.0_29) 13:12:38:273 >> ========= Mercury Interactive Class Loaders ========= 13:12:38:273 >> com.mercury.ftjadin.infra.CSClassLoaderJava2@12884e0 on top of sun.misc.Launcher$AppClassLoader@f4a24a 13:12:38:273 >> ========================================= Flushing results... Flushing results done Cobertura: Loaded information on 404 classes. Cobertura: Saved information on 404 classes. 13:20:33:712 >> DEBUG >> Releasing all waiters. There are 0 waiters active. RPC Name : \pipe\RPCQReads5_1343412758304 In DATA_HANDLE_TYPE_SERVER_bind Reached the end of function Thanks Sakthi. **** On Fri, Jul 27, 2012 at 10:33 AM, John W. Lewis <Joh...@sa...> wrote: > ** ** > > The instrumentation produces a cobertura.ser file. That same file should > be used during your testing. One way of doing this is to copy the > cobertura.ser file to the same location where your application produces the > cobertura.ser file.**** > > ** ** > > ** ** > > *From:* *** From Sakthivel Kumar*** [mailto:nsa...@gm...] > *Sent:* Wednesday, July 25, 2012 6:50 PM > *To:* cob...@li... > *Subject:* [Cobertura-devel] My percentage code coverage as 100%. Not > sure why cobertura.ser file is not properly created and this file size is > very small.**** > > ** ** > > Hello cobertura Group.**** > > Good evening.**** > > When i tried to generate code coverage using Cobertura tool, i see my > percentage code coverage as 100% in my report. Before running my tests, i > delete the existing cobertura.ser file and after running test each time, i > can see a latest cobertura.ser file is getting generated. The cobertura.ser > file generated is small in size less than 200 KB. And i am using this > latest cobertura.ser file to generate coverage report. I did not know what > is causing to give 100% code coverage report. But i expect to see the size > of cobertura.ser file generated should be bigger.**** > > **** > > Below is the steps how i did my code coverage. > a) Instrumented my EAR files and deployed to server b) Accessed my > application in the server c) latest cobertura.ser file got generated. 4) > Picked up the latest cobertura.ser file and used in my report coverage > build to generate reports. In the reports directory, when i checked the > index.html i can see 100% code coverage.**** > > **** > > Is there any other steps i am missing.? Please take a look and help me. > I appreciate your help.**** > > Thanks > Sakthivel > nsa...@gm...**** > -- Thanks and Best Regards Sakthivel Kumar nsa...@gm... |
From: John W. L. <Joh...@sa...> - 2012-07-27 18:11:57
|
We will have to investigate the exact issue. Until recently, I was under the assumption that the merge worked fine. -----Original Message----- From: Zschocke, Florian [mailto:Flo...@cy...] Sent: Friday, July 27, 2012 1:15 PM To: Eyal Edri Cc: cob...@li... Subject: Re: [Cobertura-devel] Can I deploy cobertura on a installed-by-rpm java project -----Original Message----- From: Eyal Edri [mailto:ee...@re...] ----- Original Message ----- > From: "Florian Zschocke" <Flo...@cy...> > Sent: Sunday, July 22, 2012 11:36:01 PM > > Plus, if you run the report only on the created cobertua.ser file, you > will get a code coverage of 100%. That is because only information for > the touched lines and branches will be in the file. > To get correct code coverage you need the information from the rest of > the sources, too. So you will need to merge the cobertura.ser file > created on your deployment server with the cobertura.ser file created > during instrumentation of the code. > > Be aware that Cobertura seems to have a bug when merging cobertura.ser > files. The order in which you merge the files appears to matter. This is interesting, can you please elaborate? i'm running multiple testing jobs (in devel more, i.e i compile the sources), each job creates a cobertura.ser file. once all jobs finish, i run a merge job that merges all cobertura.ser files. how do i know what is the correct order or merge to use in order to get the right results? You don't. At least I don't. I just made the experience that merging in different orders gives different results. This looks like a bug to me. I have worked around it now by making sure that one and the same cobertura.ser file is used for instrumentation of all classes and for all tests run. Best regards, Florian ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Zschocke, F. <Flo...@cy...> - 2012-07-27 17:15:21
|
-----Original Message----- From: Eyal Edri [mailto:ee...@re...] ----- Original Message ----- > From: "Florian Zschocke" <Flo...@cy...> > Sent: Sunday, July 22, 2012 11:36:01 PM > > Plus, if you run the report only on the created cobertua.ser file, you > will get a code coverage of 100%. That is because only information for > the touched lines and branches will be in the file. > To get correct code coverage you need the information from the rest of > the sources, too. So you will need to merge the cobertura.ser file > created on your deployment server with the cobertura.ser file created > during instrumentation of the code. > > Be aware that Cobertura seems to have a bug when merging cobertura.ser > files. The order in which you merge the files appears to matter. This is interesting, can you please elaborate? i'm running multiple testing jobs (in devel more, i.e i compile the sources), each job creates a cobertura.ser file. once all jobs finish, i run a merge job that merges all cobertura.ser files. how do i know what is the correct order or merge to use in order to get the right results? You don't. At least I don't. I just made the experience that merging in different orders gives different results. This looks like a bug to me. I have worked around it now by making sure that one and the same cobertura.ser file is used for instrumentation of all classes and for all tests run. Best regards, Florian |
From: John W. L. <Joh...@sa...> - 2012-07-27 15:33:53
|
The instrumentation produces a cobertura.ser file. That same file should be used during your testing. One way of doing this is to copy the cobertura.ser file to the same location where your application produces the cobertura.ser file. From: *** From Sakthivel Kumar*** [mailto:nsa...@gm...] Sent: Wednesday, July 25, 2012 6:50 PM To: cob...@li... Subject: [Cobertura-devel] My percentage code coverage as 100%. Not sure why cobertura.ser file is not properly created and this file size is very small. Hello cobertura Group. Good evening. When i tried to generate code coverage using Cobertura tool, i see my percentage code coverage as 100% in my report. Before running my tests, i delete the existing cobertura.ser file and after running test each time, i can see a latest cobertura.ser file is getting generated. The cobertura.ser file generated is small in size less than 200 KB. And i am using this latest cobertura.ser file to generate coverage report. I did not know what is causing to give 100% code coverage report. But i expect to see the size of cobertura.ser file generated should be bigger. Below is the steps how i did my code coverage. a) Instrumented my EAR files and deployed to server b) Accessed my application in the server c) latest cobertura.ser file got generated. 4) Picked up the latest cobertura.ser file and used in my report coverage build to generate reports. In the reports directory, when i checked the index.html i can see 100% code coverage. Is there any other steps i am missing.? Please take a look and help me. I appreciate your help. Thanks Sakthivel nsa...@gm...<mailto:nsa...@gm...> |
From: John W. L. <Joh...@sa...> - 2012-07-27 15:30:41
|
Hi Sakthi, First, your instrumentation command is writing to a "${reports.dir}/basic_coverage.ser" file, but the <junit> command sets net.sourceforge.cobertura.datafile to "${basedir}/cobertura.ser". Those need to be the same. Next, let me know if I am wrong, but it appears that the code you are trying to instrument is in jars. Therefore, you should see a jar (or more) in the ${instrumented.dir}. If not, then nothing is getting instrumented. In that case, you need to use this pattern: <cobertura-instrument todir="${instrumented.dir}"> <includeClasses regex=".*" /> <excludeClasses regex=".*\.Test.*" /> <instrumentationClasspath> <fileset dir="${jars.dir}"> <include name="**/*.jar" /> </fileset> </instrumentationClasspath> </cobertura-instrument> Feel free to use your <ignore regex="org.apache.log4j.*" /> in there as well. Next, since you are using jars, the classpath in your <junit> command needs to add the jars. Instead of just: <classpath location="${instrumented.dir}" /> You need: <classpath> <fileset dir="${instrumented.dir}"> <include name="**/*.jar" /> </fileset> </classpath> That should do it. Let me know if you have any problems with this. John From: *** From Sakthivel Kumar*** [mailto:nsa...@gm...] Sent: Thursday, July 26, 2012 1:03 AM To: John W. Lewis Cc: cob...@li... Subject: I do not see cobertura.ser file that is created during the instrumentation. John: As you mentioned in your below notes, after instrumentation, I fully searched my C drive, i do not see a cobertura.ser file that is created after code instrumentation is done. Below is the BuildInstument.Xml i used to for code instrumentation. Please take a look and let me know if something is wrong. Also provide me a sample working instrument build file that creates cobertura.ser file. I appreciate your help and time. Thanks in advance Sakthi <?xml version="1.0" encoding="UTF-8"?> <project name="cobertura.examples.basic" default="InstrumentQReads" basedir="."> <description> Cobertura - http://cobertura.sourceforge.net/ </description> <property file="build.properties" /> <!-- cobertura task definition --> <path id="cobertura.classpath"> <fileset dir="${cobertura.dir}"> <include name="cobertura.jar" /> <include name="lib/**/*.jar" /> </fileset> </path> <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> <target name="init"> <echo message="MHD: Inside ... init of InstrumentQReads..."/> <mkdir dir="${classes.dir}" /> <mkdir dir="${instrumented.dir}" /> <echo message="MHD: Done... init of InstrumentQReads."/> </target> <target name="compile" depends="init"> <echo message="MHD: Inside ... compile of InstrumentQReads..."/> <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="vars,lines,source" > <classpath refid="cobertura.classpath" /> </javac> <echo message="MHD: Done... compile of InstrumentQReads..."/> </target> <target name="instrument" depends="init,compile" > <echo message="MHD: Doing instrumentation for jar files."/> <!-- Remove the coverage data file and any old instrumentation. --> <delete file="cobertura.ser"/> <!-- delete dir="${instrumented.dir}" / --> <!-- Instrument the application jars, writing the instrumented jars, in to ${build.instrumented.dir}. --> <cobertura-instrument datafile="${reports.dir}/basic_coverage.ser" todir="${instrumented.dir}"> <!-- The following line causes instrument to ignore any source line containing a reference to log4j, for the purposes of coverage reporting.--> <ignore regex="org.apache.log4j.*" /> <fileset dir="${jars.dir}"> <include name="**/*.jar" /> </fileset> </cobertura-instrument> <echo message="MHD: done instrumentation of jar Files."/> </target> <target name="test" depends="init,compile"> <junit fork="yes" dir="${basedir}" failureProperty="test.failed"> <!-- Specify the name of the coverage data file to use. The value specified below is the default. --> <sysproperty key="net.sourceforge.cobertura.datafile" file="${basedir}/cobertura.ser" /> <!-- Note the classpath order: instrumented classes are before the original (uninstrumented) classes. This is important. --> <classpath location="${instrumented.dir}" /> <!-- The instrumented classes reference classes used by the Cobertura runtime, so Cobertura and its dependencies must be on your classpath. <classpath refid="cobertura_classpath" /> <formatter type="xml" /> <test name="${testcase}" todir="${reports.xml.dir}" if="testcase" /> <batchtest todir="${reports.xml.dir}" unless="testcase"> <fileset dir="${src.dir}"> <include name="**/*Test.java" /> </fileset> </batchtest> --> </junit> </target> <target name="InstrumentQReads" depends="instrument,compile,test" description="Compile and instrument QReads jar files."/> </project> On Thu, May 24, 2012 at 11:16 AM, John W. Lewis <Joh...@sa...<mailto:Joh...@sa...>> wrote: That almost always means that your tests are not using the cobertura.ser file that is created during the instrumentation. You have to make sure that the cobertura.ser file is moved to the working directory of your tests, or use the cobertura property (as described in the Cobertura Ant documentation) to point to the cobertura.ser file. From: Ionel Pagu [mailto:Ion...@te...<mailto:Ion...@te...>] Sent: Thursday, May 24, 2012 11:54 AM To: cob...@li...<mailto:cob...@li...> Subject: [Cobertura-devel] coverage not reported properly on the main page Hi, After tweaking the ant scripts a bit, I was now able to instrument, run our jUnits and then run the report successfully. However, there is one odd thing: in the main report page, the coverage is reported as 100% everywhere but I know our jUnits are not that good. Even further, if I click the links to check source code I can clearly see code not being (fully) covered. So now I am puzzled. The tools seems to detect that properly but not summarize it correctly. Any idea? Thanks, Ionel Pagu The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel -- Thanks and Best Regards Sakthivel Kumar nsa...@gm...<mailto:nsa...@gm...> |
From: *** F. S. Kumar*** <nsa...@gm...> - 2012-07-26 05:03:13
|
John: As you mentioned in your below notes, after instrumentation, I fully searched my C drive, i do not see a cobertura.ser file that is created after code instrumentation is done. Below is the BuildInstument.Xml i used to for code instrumentation. Please take a look and let me know if something is wrong. Also provide me a sample working instrument build file that creates cobertura.ser file. I appreciate your help and time. Thanks in advance Sakthi <?xml version="1.0" encoding="UTF-8"?> <project name="cobertura.examples.basic" default="InstrumentQReads" basedir="."> <description> Cobertura - http://cobertura.sourceforge.net/ </description> <property file="build.properties" /> <!-- cobertura task definition --> <path id="cobertura.classpath"> <fileset dir="${cobertura.dir}"> <include name="cobertura.jar" /> <include name="lib/**/*.jar" /> </fileset> </path> <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> <target name="init"> <echo message="MHD: Inside ... init of InstrumentQReads..."/> <mkdir dir="${classes.dir}" /> <mkdir dir="${instrumented.dir}" /> <echo message="MHD: Done... init of InstrumentQReads."/> </target> <target name="compile" depends="init"> <echo message="MHD: Inside ... compile of InstrumentQReads..."/> <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="vars,lines,source" > <classpath refid="cobertura.classpath" /> </javac> <echo message="MHD: Done... compile of InstrumentQReads..."/> </target> <target name="instrument" depends="init,compile" > <echo message="MHD: Doing instrumentation for jar files."/> <!-- Remove the coverage data file and any old instrumentation. --> <delete file="cobertura.ser"/> <!-- delete dir="${instrumented.dir}" / --> <!-- Instrument the application jars, writing the instrumented jars, in to ${build.instrumented.dir}. --> <cobertura-instrument datafile="${reports.dir}/basic_coverage.ser" todir="${instrumented.dir}"> <!-- The following line causes instrument to ignore any source line containing a reference to log4j, for the purposes of coverage reporting.--> <ignore regex="org.apache.log4j.*" /> <fileset dir="${jars.dir}"> <include name="**/*.jar" /> </fileset> </cobertura-instrument> <echo message="MHD: done instrumentation of jar Files."/> </target> <target name="test" depends="init,compile"> <junit fork="yes" dir="${basedir}" failureProperty="test.failed"> <!-- Specify the name of the coverage data file to use. The value specified below is the default. --> <sysproperty key="net.sourceforge.cobertura.datafile" file="${basedir}/cobertura.ser" /> <!-- Note the classpath order: instrumented classes are before the original (uninstrumented) classes. This is important. --> <classpath location="${instrumented.dir}" /> <!-- The instrumented classes reference classes used by the Cobertura runtime, so Cobertura and its dependencies must be on your classpath. <classpath refid="cobertura_classpath" /> <formatter type="xml" /> <test name="${testcase}" todir="${reports.xml.dir}" if="testcase" /> <batchtest todir="${reports.xml.dir}" unless="testcase"> <fileset dir="${src.dir}"> <include name="**/*Test.java" /> </fileset> </batchtest> --> </junit> </target> <target name="InstrumentQReads" depends="instrument,compile,test" description="Compile and instrument QReads jar files."/> </project> On Thu, May 24, 2012 at 11:16 AM, John W. Lewis <Joh...@sa...> wrote: > ** ** > > That almost always means that your tests are not using the cobertura.ser > file that is created during the instrumentation. You have to make sure > that the cobertura.ser file is moved to the working directory of your > tests, or use the cobertura property (as described in the Cobertura Ant > documentation) to point to the cobertura.ser file.**** > > ** ** > > ** ** > > *From:* Ionel Pagu [mailto:Ion...@te...] > *Sent:* Thursday, May 24, 2012 11:54 AM > *To:* cob...@li... > *Subject:* [Cobertura-devel] coverage not reported properly on the main > page**** > > ** ** > > Hi,**** > > **** > > After tweaking the ant scripts a bit, I was now able to instrument, run > our jUnits and then run the report successfully. However, there is one odd > thing: in the main report page, the coverage is reported as 100% everywhere > but I know our jUnits are not that good. Even further, if I click the links > to check source code I can clearly see code not being (fully) covered. So > now I am puzzled. The tools seems to detect that properly but not summarize > it correctly.**** > > **** > > Any idea?**** > > **** > > Thanks,**** > > *Ionel Pagu***** > > The information in this e-mail is confidential and may be legally > privileged. > It is intended solely for the addressee. Access to this e-mail by anyone > else is unauthorized. **** > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > -- Thanks and Best Regards Sakthivel Kumar nsa...@gm... |
From: *** F. S. Kumar*** <nsa...@gm...> - 2012-07-25 22:49:50
|
Hello cobertura Group. Good evening. When i tried to generate code coverage using Cobertura tool, i see my percentage code coverage as 100% in my report. Before running my tests, i delete the existing cobertura.ser file and after running test each time, i can see a latest cobertura.ser file is getting generated. The cobertura.ser file generated is small in size less than 200 KB. And i am using this latest cobertura.ser file to generate coverage report. I did not know what is causing to give 100% code coverage report. But i expect to see the size of cobertura.ser file generated should be bigger. Below is the steps how i did my code coverage. a) Instrumented my EAR files and deployed to server b) Accessed my application in the server c) latest cobertura.ser file got generated. 4) Picked up the latest cobertura.ser file and used in my report coverage build to generate reports. In the reports directory, when i checked the index.html i can see 100% code coverage. Is there any other steps i am missing.? Please take a look and help me. I appreciate your help. Thanks Sakthivel nsa...@gm... |
From: Eyal E. <ee...@re...> - 2012-07-23 06:17:28
|
----- Original Message ----- > From: "Florian Zschocke" <Flo...@cy...> > To: cob...@li... > Sent: Sunday, July 22, 2012 11:36:01 PM > Subject: Re: [Cobertura-devel] Can I deploy cobertura on a installed-by-rpm java project > > Plus, if you run the report only on the created cobertua.ser file, > you will get a code coverage of 100%. That is because only > information for the touched lines and branches will be in the file. > To get correct code coverage you need the information from the rest > of the sources, too. So you will need to merge the cobertura.ser > file created on your deployment server with the cobertura.ser file > created during instrumentation of the code. > > Be aware that Cobertura seems to have a bug when merging > cobertura.ser files. The order in which you merge the files appears > to matter. This is interesting, can you please elaborate? i'm running multiple testing jobs (in devel more, i.e i compile the sources), each job creates a cobertura.ser file. once all jobs finish, i run a merge job that merges all cobertura.ser files. how do i know what is the correct order or merge to use in order to get the right results? Eyal. > > ________________________________________ > From: Steve Christou [sch...@gm...] > Sent: Sunday, July 22, 2012 12:04 PM > > For cobertura, when you instrument code, you are instrumenting the > byte code, this is the compiled source code, so the .class files. You > are able to instrument without the source code, although it will not > provide you with much information, because you would need to get the > source code somehow to view the results from the code coverage. > > To cover your Scenario, yes it is possible to do everything you > mentioned. First instrument the .class files and package it all up. > Then hand the packaged items to your live server(or deployment > server). Once you believe you've gathered enough data, a > cobertura.ser > file will be created when the jvm shuts down. This is the most > important file as it contains all the coverage results. Grab this > file > and bring back to your development environment and run the > cobertura-report target with the source code and you should see code > coverage. > > On Sun, Jul 22, 2012 at 4:53 AM, Rami Vaknin <rv...@re...> > wrote: > > Hi, > > > > I would like to use code coverage tool on a java project "build" > > environment which installed from rpm. I've heard from a colleague > > that > > cobertura can fit and that he uses cobertura on a development > > environment of the same java project where the source code is > > available > > and the build is done manually using maven. > > > > Can I run cobertura on a build environment without source code? Can > > I > > run cobertura on a "build" environement while the source code is > > available but the jars are deployed on a different location than > > they > > are deploy when building them manually? > > > > -- > > > > Thanks, > > > > Rami Vaknin, QE @ Red Hat, TLV, IL. > > > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. > > Discussions > > will include endpoint security, mobile security and the latest in > > malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > |
From: Zschocke, F. <Flo...@cy...> - 2012-07-22 20:36:13
|
Plus, if you run the report only on the created cobertua.ser file, you will get a code coverage of 100%. That is because only information for the touched lines and branches will be in the file. To get correct code coverage you need the information from the rest of the sources, too. So you will need to merge the cobertura.ser file created on your deployment server with the cobertura.ser file created during instrumentation of the code. Be aware that Cobertura seems to have a bug when merging cobertura.ser files. The order in which you merge the files appears to matter. ________________________________________ From: Steve Christou [sch...@gm...] Sent: Sunday, July 22, 2012 12:04 PM For cobertura, when you instrument code, you are instrumenting the byte code, this is the compiled source code, so the .class files. You are able to instrument without the source code, although it will not provide you with much information, because you would need to get the source code somehow to view the results from the code coverage. To cover your Scenario, yes it is possible to do everything you mentioned. First instrument the .class files and package it all up. Then hand the packaged items to your live server(or deployment server). Once you believe you've gathered enough data, a cobertura.ser file will be created when the jvm shuts down. This is the most important file as it contains all the coverage results. Grab this file and bring back to your development environment and run the cobertura-report target with the source code and you should see code coverage. On Sun, Jul 22, 2012 at 4:53 AM, Rami Vaknin <rv...@re...> wrote: > Hi, > > I would like to use code coverage tool on a java project "build" > environment which installed from rpm. I've heard from a colleague that > cobertura can fit and that he uses cobertura on a development > environment of the same java project where the source code is available > and the build is done manually using maven. > > Can I run cobertura on a build environment without source code? Can I > run cobertura on a "build" environement while the source code is > available but the jars are deployed on a different location than they > are deploy when building them manually? > > -- > > Thanks, > > Rami Vaknin, QE @ Red Hat, TLV, IL. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Steve C. <sch...@gm...> - 2012-07-22 10:04:39
|
For cobertura, when you instrument code, you are instrumenting the byte code, this is the compiled source code, so the .class files. You are able to instrument without the source code, although it will not provide you with much information, because you would need to get the source code somehow to view the results from the code coverage. To cover your Scenario, yes it is possible to do everything you mentioned. First instrument the .class files and package it all up. Then hand the packaged items to your live server(or deployment server). Once you believe you've gathered enough data, a cobertura.ser file will be created when the jvm shuts down. This is the most important file as it contains all the coverage results. Grab this file and bring back to your development environment and run the cobertura-report target with the source code and you should see code coverage. On Sun, Jul 22, 2012 at 4:53 AM, Rami Vaknin <rv...@re...> wrote: > Hi, > > I would like to use code coverage tool on a java project "build" > environment which installed from rpm. I've heard from a colleague that > cobertura can fit and that he uses cobertura on a development > environment of the same java project where the source code is available > and the build is done manually using maven. > > Can I run cobertura on a build environment without source code? Can I > run cobertura on a "build" environement while the source code is > available but the jars are deployed on a different location than they > are deploy when building them manually? > > -- > > Thanks, > > Rami Vaknin, QE @ Red Hat, TLV, IL. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Rami V. <rv...@re...> - 2012-07-22 09:53:51
|
Hi, I would like to use code coverage tool on a java project "build" environment which installed from rpm. I've heard from a colleague that cobertura can fit and that he uses cobertura on a development environment of the same java project where the source code is available and the build is done manually using maven. Can I run cobertura on a build environment without source code? Can I run cobertura on a "build" environement while the source code is available but the jars are deployed on a different location than they are deploy when building them manually? -- Thanks, Rami Vaknin, QE @ Red Hat, TLV, IL. |
From: Daniel Z. <dz...@gm...> - 2012-07-21 01:51:52
|
I'm trying to use this with the latest branch build: https://cobertura.svn.sourceforge.net/svnroot/cobertura/branches/ptab_v2_0/cobertura This is my ant instrumentation code: <cobertura-instrument todir="${coverage.build.dir}/classes"> <ignore regex="cobertura.regex.excludes" /> <ignoreMethodAnnotation annotationName="org.junit.Test"/> <ignoreMethodAnnotation annotationName="java.lang.Deprecated"/> <fileset dir="${build.dir}"> <include name="**/*.class" /> </fileset> </cobertura-instrument> The resulting cobertura html report does not have Test/Deprecated coverage filtered out. Am I doing something wrong? Thanks, Danny |
From: John W. L. <Joh...@sa...> - 2012-07-19 17:30:17
|
The current directory. From: vivek venugopal [mailto:viv...@gm...] Sent: Thursday, July 19, 2012 1:09 PM To: cob...@li... Subject: [Cobertura-devel] Default location where Cobertura looks for .ser file Hi, If the Cobertura data file (cobertura.ser) is not specified as a Java system property where will it look for the data file, will it check it in the current directory or will it check in a default location or something else. Thanks |
From: vivek v. <viv...@gm...> - 2012-07-19 17:08:50
|
Hi, If the Cobertura data file (cobertura.ser) is not specified as a Java system property where will it look for the data file, will it check it in the current directory or will it check in a default location or something else. Thanks |
From: arpitha g. <ap....@gm...> - 2012-07-18 22:42:45
|
> > Hi, > I have been generating cobertura report for some time now without any > change. But all of a sudden i see method/functional coverage section > missing! > The 6 parameters for which i used to see coverage numbers were : > Classes, Conditionals, Files, Lines, *Methods*, Packages. > Now *Methods* is missing!!!! > Even thought the same testcases were run and teh same version of cobertura > was used all along. Can someone help me with this? > Thanks. > |
From: Jayan M N <ja...@gm...> - 2012-07-14 09:55:46
|
http://cobertura.sourceforge.net/introduction.html See destdir ... -jayan On Jul 14, 2012 3:17 PM, "Jahnavi Kondaraju" <jah...@gm...> wrote: > Hai, > I have a question about report generating in cobertura. I have > installed cobertura in FEDORA LINUX.. in that i instrumented class files > for coverage and cobertura.ser file is created, but when trying to check > coverage report it is showing error of "destination directory must be set". > Please help hpw to check the report and how to set the destination > directory??? > > > -- > *REGARDS* > *JAHNAVI K.* > > > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > |
From: Jahnavi K. <jah...@gm...> - 2012-07-14 09:45:21
|
Hai, I have a question about report generating in cobertura. I have installed cobertura in FEDORA LINUX.. in that i instrumented class files for coverage and cobertura.ser file is created, but when trying to check coverage report it is showing error of "destination directory must be set". Please help hpw to check the report and how to set the destination directory??? -- *REGARDS* *JAHNAVI K.* |
From: Zschocke, F. <Flo...@cy...> - 2012-07-13 16:08:16
|
Hello, I noticed why generating reports from merged cobertura.ser files would sometimes show incorrect branch coverage. The branch coverage data is dependent on the order in which the cobertura.ser files are merged. The line coverage data seems to the unrelated. As I didn't see this being documented anywhere, I wonder if this is a bug. Why is this, is there a reason for it? Shouldn't merging data files be independent on the order? Thanks, Florian |
From: Zschocke, F. <Flo...@cy...> - 2012-07-13 10:31:26
|
> -----Original Message----- > From: Steve Christou [mailto:sch...@gm...] > Sent: Friday, July 13, 2012 12:17 PM > > It is not required because if the file does not exist, it will create a > new cobertura.ser file with the coverage results in there. Yes, if you > run the cobertura-merge tool you should be able to merge both results > without issues. It is only recommend so you don't have that extra step > at the end of merging. Great, thanks. Good to know. I think in my case it may turn out to be easier to first collect data and only later merge with the full information. Thanks a lot, Florian |
From: Jayan M N <ja...@gm...> - 2012-07-13 10:23:28
|
On Fri, Jul 13, 2012 at 1:53 PM, Zschocke, Florian <Flo...@cy...> wrote: > Hi! > > I have a question about the cobertura.ser file. Is this file needed while running the tests and collection data? I know a new file is written after the test run when none was present, but is it of any advantage if the file is present while the tests run? > > >From the code I gathered that it doesn't matter if the cobertura.ser file is present. The only place I found where it is read during collecting stats is at the end when the final data is written at shutdown. There prior contents get merged with the new data collected. I didn't find anything in the code that hints at the data collection profiting from information added to the file during instrumentation. The instrumented code seems to be pretty self contained. > > I am asking because I am trying to run Cobertura instrumented code in an OSGi container and later merging the resulting cobertura.ser file with the one created by instrumentation. I understand that you need the data file from instrumentation in order to get actual coverage data, so that I don't end up with 100% coverage. I am just trying to find out if I can safely merge the separately created collection and instrumentation cobertura.ser files and end up with correct data. I am unsure because sometimes I end up with proper line coverage but 0% branch coverage, which is wrong. It is actually better to run tests the way you described. Writing of coverage data is faster when the original cobertura.ser is not present (as there is nothing to merge). You definitely need to merge the generated one with the cobertura.ser created at the time on instrumentation. Thanks, Jayan |
From: Steve C. <sch...@gm...> - 2012-07-13 10:17:00
|
It is not required because if the file does not exist, it will create a new cobertura.ser file with the coverage results in there. Yes, if you run the cobertura-merge tool you should be able to merge both results without issues. It is only recommend so you don't have that extra step at the end of merging. On Fri, Jul 13, 2012 at 3:23 AM, Zschocke, Florian <Flo...@cy...> wrote: > Hi! > > I have a question about the cobertura.ser file. Is this file needed while running the tests and collection data? I know a new file is written after the test run when none was present, but is it of any advantage if the file is present while the tests run? > > >From the code I gathered that it doesn't matter if the cobertura.ser file is present. The only place I found where it is read during collecting stats is at the end when the final data is written at shutdown. There prior contents get merged with the new data collected. I didn't find anything in the code that hints at the data collection profiting from information added to the file during instrumentation. The instrumented code seems to be pretty self contained. > > I am asking because I am trying to run Cobertura instrumented code in an OSGi container and later merging the resulting cobertura.ser file with the one created by instrumentation. I understand that you need the data file from instrumentation in order to get actual coverage data, so that I don't end up with 100% coverage. I am just trying to find out if I can safely merge the separately created collection and instrumentation cobertura.ser files and end up with correct data. I am unsure because sometimes I end up with proper line coverage but 0% branch coverage, which is wrong. > > Thanks, > Florian > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel |