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: Jayan M N <ja...@gm...> - 2013-04-28 07:38:00
|
Instrumentation, data collection and reporting works. ( My code based is still mostly jdk6) There are many exceptions similar to below. They end up as warning. The call stack remain same. Is there way to collect more information in these cases? [cobertura-instrument] java.lang.RuntimeException: java.lang.ClassNotFoundException: chs.common.IUID [cobertura-instrument] at org.objectweb.asm.ClassWriter.getCommonSuperClass(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.Frame.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.Frame.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source) [cobertura-instrument] at org.objectweb.asm.MethodAdapter.visitMaxs(Unknown Source) [cobertura-instrument] at org.objectweb.asm.commons.LocalVariablesSorter.visitMaxs(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassReader.accept(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassReader.accept(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:194) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.addInstrumentationToArchive(Main.java:173) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.addInstrumentationToArchive(Main.java:287) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:426) [cobertura-instrument] at net.sourceforge.cobertura.instrument.Main.main(Main.java:450) Once again, thanks for the wonderful effort. Jayan On Tue, Apr 23, 2013 at 5:59 PM, Steven Christou <sch...@gm...>wrote: > Hello everyone, > > I just wanted to give everyone a quick status update on the progress of > the items I had with java 7. There are many great new features with java 7 > including: > Try with resources > Simplified diamond operators > String switch statements > Numbers with underscores > Multi-catch blocks > (see http://pastebin.com/3DXAca18 for a sample test case I used while > fixing for java 7) > > I have fixed all these features in the trunk version of cobertura( > https://github.com/cobertura/cobertura/commit/52104a55e416b8e81a669a4adeed84e8d72a844e). > I was wondering if a few daring souls would be willing to beta test the > code changes I made, just so I do not get bombarded with bug fixes moments > after releasing. > > For anyone who is interested, I created the channel #cobertura on > irc.freenode.net which I will be using from time to time to provide some > installation support or bug issues. > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > |
From: Steven C. <sch...@gm...> - 2013-04-23 12:29:16
|
Hello everyone, I just wanted to give everyone a quick status update on the progress of the items I had with java 7. There are many great new features with java 7 including: Try with resources Simplified diamond operators String switch statements Numbers with underscores Multi-catch blocks (see http://pastebin.com/3DXAca18 for a sample test case I used while fixing for java 7) I have fixed all these features in the trunk version of cobertura( https://github.com/cobertura/cobertura/commit/52104a55e416b8e81a669a4adeed84e8d72a844e). I was wondering if a few daring souls would be willing to beta test the code changes I made, just so I do not get bombarded with bug fixes moments after releasing. For anyone who is interested, I created the channel #cobertura on irc.freenode.net which I will be using from time to time to provide some installation support or bug issues. |
From: Steven C. <sch...@gm...> - 2013-04-15 23:51:22
|
Hello Everyone, I would just like to mention that the cobertura source code has officially been moved to github https://github.com/cobertura/cobertura. I am currently working on getting cobertura compatible with 1.7 and releasing an update as soon as possible. Thanks, Steve. |
From: John W. L. <Joh...@sa...> - 2013-04-08 15:07:18
|
If there are no objections, I would like to add Steven Christou as another administrator of Cobertura. John |
From: Sapan d. <sap...@gm...> - 2013-03-09 02:40:08
|
Hi All, I have maven 3 on my machine and I have a maven project with cucumber test classes with POM as follows. So, when i run my integration test on these classes, it creates a coverage report. But when i try to click on the classes, the source code is not found. It says, unable to locate file... have you specified the source directory. My POM might be full of error, but the maven-cobertura-plugin just doesnt work for me (i dont know why, it neither instruments, nor does anything else). So i integrated ant plugin to instrument and in test phase, use the same cobertura.ser for updation on it. After running the maven test command - e.g. mvn clean integration-test -Dcucmber.option..... The cobertura.ser file is created in /target/cobertura/ Then i run - mvn cobertura:cobertura Then, it creates a /target/site/cobertura/index.html the file contains the coverage but the source is not displayed when i click the class link in the coverage report. The report however shows coverage percentage, which i believe is correct based on my test. So guys, can you help me get the code visible too. I might have 100 combination so far, but it is just not working. I also don't know why maven-cobertura-plugin without my maven-ant-plugin does not work. Now as this combination seem to work, please help me get the source as well, I'll try to figure out the rest later. Thanks, in advance <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.cobertura.project</groupId> <artifactId>CoberturaCukesPOC</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>CukesPOC</name> <url>http://maven.apache.org</url> <repositories> <repository> <id>maven</id> <url> http://repo1.maven.org/maven2</url> </repository> <repository> <id>sonatype-snapshots</id> <url> https://oss.sonatype.org/content/repositories/snapshots</url> </repository> <repository> <id>nextag</id> <url> http://crepo.corp.nextag.com/repo/libraries/maven2</url> </repository> <repository> <id>nextag repo2</id> <url> http://crepo.corp.nextag.com/repo/components2</url> </repository> </repositories> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <surefire.report.location>target/surefire-reports1</surefire.report.location> </properties> <dependencies> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-java</artifactId> <version>1.1.2</version> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-core</artifactId> <version>1.1.2</version> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-junit</artifactId> <version>1.1.2</version> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-picocontainer</artifactId> <version>1.1.2</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.30.0</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.2.3</version> </dependency> <dependency> <groupId>org.picocontainer</groupId> <artifactId>picocontainer</artifactId> <version>2.14.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>10.2.0.4.0</version> </dependency> <dependency> <groupId>net.sourceforge.cobertura</groupId> <artifactId>cobertura</artifactId> <optional>true</optional> <version>1.9.4.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>cobertura-inplace-instrumentation-pretest</id> <phase>package</phase> <configuration> <tasks> <taskdef classpathref="maven.plugin.classpath" resource="tasks.properties" /> <cobertura-instrument datafile="target/cobertura/cobertura.ser"> <fileset dir="target/test-classes/com/cobertura/coverage/"> <include name="**/*.class" /> </fileset> </cobertura-instrument> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>net.sourceforge.cobertura</groupId> <artifactId>cobertura</artifactId> <version>1.9.4.1</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.11</version> <configuration> <!-- Skip the normal tests, we'll run them in the integration-test phase --> <skip>true</skip> </configuration> <executions> <execution> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <skip>false</skip> <includes> <include>**/*.class</include> </includes> <systemPropertyVariables> <job.host.name>v-t10</job.host.name> <job.email.notification>ab...@ab...</job.email.notification> <cucumber.options>--format pretty --format html:target/cucumber/cucumber-html</cucumber.options> </systemPropertyVariables> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.5.2</version> <executions> <execution> <id>instrument</id> <phase>test</phase> <goals> <goal>instrument</goal> </goals> </execution> </executions> <configuration> <dataFile>./target/cobertura/cobertura.ser</dataFile> <instrumentation> <includes> <include>**/*.class</include> </includes> </instrumentation> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <configuration> <outputDirectory>${surefire.report.location}</outputDirectory> </configuration> <executions> <execution> <phase>test</phase> <goals> <goal>report-only</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> |
From: Sapan d. <sap...@gm...> - 2013-03-09 02:19:06
|
Hi All, I have a situation and i am not able to figure out how to get out of it - I have a main application code head branch, and i cut out a branch from it and created a maven project with cucumber as tests. So, when i run maven integration test on this project from local machine, my test runs on a server, where the main application build is deployed and my test classes trigger some classes of the main application code and do some work based on test data e.g put some re calculated values in the DB. My test classes are only validating the db entries put by the application code against my test data set So, when i put a cobertura plugin into my project pom and run the tests, the cobertura report only contains the coverage of my test classes (my maven project with cucumber test step definitions). But my requirement is that i get the coverage of all the main application code which was triggered by my test. I am not able to figure out how to do it, because in my project i have the typical maven directory structure of src->test->java, which contains only my test code and my pom instrumentation section has only access to these files only, which i believe is one of the reason that the main called application code is not covered. So, can you help me find a way, so that i am able to get the coverage of the main application which my test has invoked. Thanks a lot, in advance. |
From: Ravishankar, C. <Cha...@nd...> - 2013-03-08 05:47:58
|
Hi Steven, Lewis, You are right. The problem is only with the percentage of branch coverage. The others are not 0%. During the run we are generating a new file to avoid OOM error. I am using this on a device which is having very small memory. So on the device I am just collecting the data for the code ran. And then doing the merge with the original data file on the PC. But what I was not able to understand is how merge can go wrong just due to a different file name? But to my bad luck, I am not able to reproduce this issue today :). Anyways, Thanks for your reply guys. Regards, Chandan From: Steven Christou [mailto:sch...@gm...] Sent: Thursday, March 07, 2013 6:37 PM To: John W. Lewis Cc: Ravishankar, Chandan; cob...@li... Subject: Re: [Cobertura-devel] Very Strange Bug on 1.9 When you say "% branch coverage always zero", does that mean coverage is displayed (line coverage, method/class coverage, etc. are not 0%), it's just the branch coverage section is 0%? If that's the case it could be an issue with the cobertura merge tool. But I do agree with John that you should use the cobertura.ser file that's generated during the instrumentation instead of letting cobertura generate a new file, and merging them in the end. On 03/07/2013 06:54 AM, John W. Lewis wrote: By default, Cobertura will use a filename of cobertura.ser. If you want to use a different file, then you have to use the property that Steven mentioned. By the way, there is no need to do a merge in this case. Usually people just use the cobertura.ser file that is generated during instrumentation. From: Ravishankar, Chandan [mailto:Cha...@nd...] Sent: Thursday, March 07, 2013 7:39 AM To: Steven Christou Cc: cob...@li...<mailto:cob...@li...> Subject: Re: [Cobertura-devel] Very Strange Bug on 1.9 Hi Steven, The problem is not with the data file while running the code. In the working scenario here is what I am doing: 1. While instrumenting I get the data(which is basically 0 coverage) in the file called cobertura.ser. 2. While running the code I collect the data in the file called runtimedata.ser. 3. Finally I merge both the files generated in the above step and generate a report. Now in step 1 if you name the file to something else apart from cobertura, you see the % branch coverage always zero. This looked very strange to me. Regards, Chandan From: Steven Christou [mailto:sch...@gm...] Sent: Thursday, March 07, 2013 6:03 PM To: Ravishankar, Chandan Cc: cob...@li...<mailto:cob...@li...> Subject: Re: [Cobertura-devel] Very Strange Bug on 1.9 Make sure that your tests have the following argument for your jvm -Dnet.sourceforge.cobertura.datafile=C:\MyProject\build\cobertura.ser Which tells the jvm where the .ser file is located for storing information. On 03/07/2013 01:36 AM, Ravishankar, Chandan wrote: Hi All, I faced a very strange issue on 1.9 version of the cobertura. While instrumenting, if I give the data file name anything other than cobertura.ser, then I won't get the percentage branch coverage details in my report. I always get the percentage branch coverage as zero. But the details inside the class looks fine. If I give the data file name as cobertura.ser, it works fine. It took me a while to figure out. Curious to know what is there with the file name which can make my branch coverage percentage 0. The same issue is not present in the latest version. Regards, Chandan Ravishankar| Desk: 64529 | Cell: +91 994 550 1674 ________________________________ This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the pos...@nd...<mailto:pos...@nd...> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. An NDS Group Limited company. www.nds.com<http://www.nds.com> ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: John W. L. <Joh...@sa...> - 2013-03-07 13:09:57
|
By default, Cobertura will use a filename of cobertura.ser. If you want to use a different file, then you have to use the property that Steven mentioned. By the way, there is no need to do a merge in this case. Usually people just use the cobertura.ser file that is generated during instrumentation. From: Ravishankar, Chandan [mailto:Cha...@nd...] Sent: Thursday, March 07, 2013 7:39 AM To: Steven Christou Cc: cob...@li... Subject: Re: [Cobertura-devel] Very Strange Bug on 1.9 Hi Steven, The problem is not with the data file while running the code. In the working scenario here is what I am doing: 1. While instrumenting I get the data(which is basically 0 coverage) in the file called cobertura.ser. 2. While running the code I collect the data in the file called runtimedata.ser. 3. Finally I merge both the files generated in the above step and generate a report. Now in step 1 if you name the file to something else apart from cobertura, you see the % branch coverage always zero. This looked very strange to me. Regards, Chandan From: Steven Christou [mailto:sch...@gm...] Sent: Thursday, March 07, 2013 6:03 PM To: Ravishankar, Chandan Cc: cob...@li...<mailto:cob...@li...> Subject: Re: [Cobertura-devel] Very Strange Bug on 1.9 Make sure that your tests have the following argument for your jvm -Dnet.sourceforge.cobertura.datafile=C:\MyProject\build\cobertura.ser Which tells the jvm where the .ser file is located for storing information. On 03/07/2013 01:36 AM, Ravishankar, Chandan wrote: Hi All, I faced a very strange issue on 1.9 version of the cobertura. While instrumenting, if I give the data file name anything other than cobertura.ser, then I won't get the percentage branch coverage details in my report. I always get the percentage branch coverage as zero. But the details inside the class looks fine. If I give the data file name as cobertura.ser, it works fine. It took me a while to figure out. Curious to know what is there with the file name which can make my branch coverage percentage 0. The same issue is not present in the latest version. Regards, Chandan Ravishankar | Desk: 64529 | Cell: +91 994 550 1674 ________________________________ This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the pos...@nd...<mailto:pos...@nd...> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. An NDS Group Limited company. www.nds.com<http://www.nds.com> ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Steven C. <sch...@gm...> - 2013-03-07 13:06:56
|
When you say "% branch coverage always zero", does that mean coverage is displayed (line coverage, method/class coverage, etc. are not 0%), it's just the branch coverage section is 0%? If that's the case it could be an issue with the cobertura merge tool. But I do agree with John that you should use the cobertura.ser file that's generated during the instrumentation instead of letting cobertura generate a new file, and merging them in the end. On 03/07/2013 06:54 AM, John W. Lewis wrote: > > By default, Cobertura will use a filename of cobertura.ser. If you > want to use a different file, then you have to use the property that > Steven mentioned. > > By the way, there is no need to do a merge in this case. Usually > people just use the cobertura.ser file that is generated during > instrumentation. > > *From:*Ravishankar, Chandan [mailto:Cha...@nd...] > *Sent:* Thursday, March 07, 2013 7:39 AM > *To:* Steven Christou > *Cc:* cob...@li... > *Subject:* Re: [Cobertura-devel] Very Strange Bug on 1.9 > > Hi Steven, > > The problem is not with the data file while running the code. > > In the working scenario here is what I am doing: > > 1.While instrumenting I get the data(which is basically 0 coverage) in > the file called cobertura.ser. > > 2.While running the code I collect the data in the file called > runtimedata.ser. > > 3.Finally I merge both the files generated in the above step and > generate a report. > > Now in step 1 if you name the file to something else apart from > cobertura, you see the % branch coverage always zero. > > This looked very strange to me. > > Regards, > > Chandan > > *From:*Steven Christou [mailto:sch...@gm...] > *Sent:* Thursday, March 07, 2013 6:03 PM > *To:* Ravishankar, Chandan > *Cc:* cob...@li... > <mailto:cob...@li...> > *Subject:* Re: [Cobertura-devel] Very Strange Bug on 1.9 > > Make sure that your tests have the following argument for your jvm > > -Dnet.sourceforge.cobertura.datafile=C:\MyProject\build\cobertura.ser > > Which tells the jvm where the .ser file is located for storing > information. > > On 03/07/2013 01:36 AM, Ravishankar, Chandan wrote: > > Hi All, > > I faced a very strange issue on 1.9 version of the cobertura. > > While instrumenting, if I give the data file name anything other > than cobertura.ser, then I won't get the percentage branch > coverage details in my report. > > I always get the percentage branch coverage as zero. But the > details inside the class looks fine. > > If I give the data file name as cobertura.ser, it works fine. > > It took me a while to figure out. > > Curious to know what is there with the file name which can make my > branch coverage percentage 0. > > The same issue is not present in the latest version. > > Regards, > > *Chandan Ravishankar*| Desk: 64529 | Cell: +91 994 550 1674 > > ------------------------------------------------------------------------ > > > This message is confidential and intended only for the addressee. > If you have received this message in error, please immediately > notify the pos...@nd... <mailto:pos...@nd...> and > delete it from your system as well as any copies. The content of > e-mails as well as traffic data may be monitored by NDS for > employment and security purposes. > To protect the environment please do not print this e-mail unless > necessary. > > An NDS Group Limited company. www.nds.com <http://www.nds.com> > > > ------------------------------------------------------------------------------ > > Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester > > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the > > endpoint security space. For insight on selecting the right partner to > > tackle endpoint security challenges, access the full report. > > http://p.sf.net/sfu/symantec-dev2dev > > > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... <mailto:Cob...@li...> > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > |
From: Ravishankar, C. <Cha...@nd...> - 2013-03-07 12:39:16
|
Hi Steven, The problem is not with the data file while running the code. In the working scenario here is what I am doing: 1. While instrumenting I get the data(which is basically 0 coverage) in the file called cobertura.ser. 2. While running the code I collect the data in the file called runtimedata.ser. 3. Finally I merge both the files generated in the above step and generate a report. Now in step 1 if you name the file to something else apart from cobertura, you see the % branch coverage always zero. This looked very strange to me. Regards, Chandan From: Steven Christou [mailto:sch...@gm...] Sent: Thursday, March 07, 2013 6:03 PM To: Ravishankar, Chandan Cc: cob...@li... Subject: Re: [Cobertura-devel] Very Strange Bug on 1.9 Make sure that your tests have the following argument for your jvm -Dnet.sourceforge.cobertura.datafile=C:\MyProject\build\cobertura.ser Which tells the jvm where the .ser file is located for storing information. On 03/07/2013 01:36 AM, Ravishankar, Chandan wrote: Hi All, I faced a very strange issue on 1.9 version of the cobertura. While instrumenting, if I give the data file name anything other than cobertura.ser, then I won't get the percentage branch coverage details in my report. I always get the percentage branch coverage as zero. But the details inside the class looks fine. If I give the data file name as cobertura.ser, it works fine. It took me a while to figure out. Curious to know what is there with the file name which can make my branch coverage percentage 0. The same issue is not present in the latest version. Regards, Chandan Ravishankar | Desk: 64529 | Cell: +91 994 550 1674 ________________________________ This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the pos...@nd...<mailto:pos...@nd...> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. An NDS Group Limited company. www.nds.com<http://www.nds.com> ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Steven C. <sch...@gm...> - 2013-03-07 12:33:06
|
Make sure that your tests have the following argument for your jvm -Dnet.sourceforge.cobertura.datafile=C:\MyProject\build\cobertura.ser Which tells the jvm where the .ser file is located for storing information. On 03/07/2013 01:36 AM, Ravishankar, Chandan wrote: > > Hi All, > > I faced a very strange issue on 1.9 version of the cobertura. > > While instrumenting, if I give the data file name anything other than > cobertura.ser, then I won't get the percentage branch coverage details > in my report. > > I always get the percentage branch coverage as zero. But the details > inside the class looks fine. > > If I give the data file name as cobertura.ser, it works fine. > > It took me a while to figure out. > > Curious to know what is there with the file name which can make my > branch coverage percentage 0. > > The same issue is not present in the latest version. > > Regards, > > *Chandan Ravishankar*| Desk: 64529 | Cell: +91 994 550 1674 > > > ------------------------------------------------------------------------ > > This message is confidential and intended only for the addressee. If > you have received this message in error, please immediately notify the > pos...@nd... and delete it from your system as well as any > copies. The content of e-mails as well as traffic data may be > monitored by NDS for employment and security purposes. > To protect the environment please do not print this e-mail unless > necessary. > > An NDS Group Limited company. www.nds.com > > > ------------------------------------------------------------------------------ > Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the > endpoint security space. For insight on selecting the right partner to > tackle endpoint security challenges, access the full report. > http://p.sf.net/sfu/symantec-dev2dev > > > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Ravishankar, C. <Cha...@nd...> - 2013-03-07 07:37:04
|
Hi All, I faced a very strange issue on 1.9 version of the cobertura. While instrumenting, if I give the data file name anything other than cobertura.ser, then I won't get the percentage branch coverage details in my report. I always get the percentage branch coverage as zero. But the details inside the class looks fine. If I give the data file name as cobertura.ser, it works fine. It took me a while to figure out. Curious to know what is there with the file name which can make my branch coverage percentage 0. The same issue is not present in the latest version. Regards, Chandan Ravishankar | Desk: 64529 | Cell: +91 994 550 1674 ________________________________ This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the pos...@nd... and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. An NDS Group Limited company. www.nds.com |
From: Steve C. <sch...@gm...> - 2013-02-22 20:16:50
|
@Sampath I believe this could be an issue for the cobertura maven people (see http://mojo.codehaus.org/cobertura-maven-plugin/). In ant we have the todir argument which provides you the ability to save the cobertura data to another directory instead of replacing. On Fri, Feb 22, 2013 at 11:11 AM, Rajagopal, Sampath < Sam...@vc...> wrote: > This question relates to combination of maven and cobertura.**** > > I can instrument the classes.**** > > I would like to create two war files – one a normal war file and the other > instrumented war file. Say, x.war (normal one) and x_I.war (instrumented > one) for a given maven project. I am not sure how to create these two war > files using single POM file for the same project.**** > > ** ** > > We have a top level pom and individual poms for each project. It is > hierarchial.**** > > ** ** > > I am trying to use maven profiles but not able to get through. **** > > mvn package (to produce x.war)**** > > mvn package –Pcobertura (to produce x_I.war)**** > > ** ** > > Can someone guide me through with real examples ? I am open to > antrun-plugin also.**** > > Appreciate any help.**** > > ** ** > > *From:* John W. Lewis [mailto:Joh...@sa...] > *Sent:* Thursday, February 21, 2013 10:01 PM > *To:* Varghese Renny > > *Cc:* cob...@li... > *Subject:* Re: [Cobertura-devel] How to use Cobertura with Selenium > webdriver?**** > > ** ** > > ** ** > > I should have said instrument the classes. However, you can instrument > jars, wars, ears, and Cobertura will open them up and instrument the > classes inside them.**** > > ** ** > > ** ** > > *From:* Varghese Renny [mailto:var...@gm...<var...@gm...>] > > *Sent:* Friday, February 22, 2013 12:05 AM > *To:* John W. Lewis > *Cc:* cob...@li... > *Subject:* Re: [Cobertura-devel] How to use Cobertura with Selenium > webdriver?**** > > ** ** > > Thanks for the reply.. > HI lewis, > I don't get the instrument the jar file step. > Below step are correct?..Any mistake is there. > > > 1. Automaton project should be web project..Instrumented the src > folder(using cobertura jar file) . So i got one instrumented classes in > build folder. > 2. I created war file > 3. Deploy to webserver. > 4.Run my testcases against the deployed application > 5.Shutdown the webserver > 6.Run the report. > > **** > > On Fri, Feb 22, 2013 at 3:53 AM, John W. Lewis <Joh...@sa...> > wrote:**** > > **** > > Yes. It will work. You instrument the jars; deploy them to your web > server; run your selenium tests; shutdown the web server (or use the > flushCobertura.war); run the report.**** > > **** > > **** > > *From:* Varghese Renny [mailto:var...@gm...] > *Sent:* Thursday, February 21, 2013 3:31 AM > *To:* cob...@li... > *Subject:* [Cobertura-devel] How to use Cobertura with Selenium webdriver? > **** > > **** > > Hi, > I need to know the possible of cobertura with automation framework > -selenium webdriver. Can i do test coverage in automation? > > > > Regards, > varghese**** > > ** ** > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > |
From: Rajagopal, S. <Sam...@vc...> - 2013-02-22 17:12:05
|
This question relates to combination of maven and cobertura. I can instrument the classes. I would like to create two war files - one a normal war file and the other instrumented war file. Say, x.war (normal one) and x_I.war (instrumented one) for a given maven project. I am not sure how to create these two war files using single POM file for the same project. We have a top level pom and individual poms for each project. It is hierarchial. I am trying to use maven profiles but not able to get through. mvn package (to produce x.war) mvn package -Pcobertura (to produce x_I.war) Can someone guide me through with real examples ? I am open to antrun-plugin also. Appreciate any help. From: John W. Lewis [mailto:Joh...@sa...] Sent: Thursday, February 21, 2013 10:01 PM To: Varghese Renny Cc: cob...@li... Subject: Re: [Cobertura-devel] How to use Cobertura with Selenium webdriver? I should have said instrument the classes. However, you can instrument jars, wars, ears, and Cobertura will open them up and instrument the classes inside them. From: Varghese Renny [mailto:var...@gm...] Sent: Friday, February 22, 2013 12:05 AM To: John W. Lewis Cc: cob...@li...<mailto:cob...@li...> Subject: Re: [Cobertura-devel] How to use Cobertura with Selenium webdriver? Thanks for the reply.. HI lewis, I don't get the instrument the jar file step. Below step are correct?..Any mistake is there. 1. Automaton project should be web project..Instrumented the src folder(using cobertura jar file) . So i got one instrumented classes in build folder. 2. I created war file 3. Deploy to webserver. 4.Run my testcases against the deployed application 5.Shutdown the webserver 6.Run the report. On Fri, Feb 22, 2013 at 3:53 AM, John W. Lewis <Joh...@sa...<mailto:Joh...@sa...>> wrote: Yes. It will work. You instrument the jars; deploy them to your web server; run your selenium tests; shutdown the web server (or use the flushCobertura.war); run the report. From: Varghese Renny [mailto:var...@gm...<mailto:var...@gm...>] Sent: Thursday, February 21, 2013 3:31 AM To: cob...@li...<mailto:cob...@li...> Subject: [Cobertura-devel] How to use Cobertura with Selenium webdriver? Hi, I need to know the possible of cobertura with automation framework -selenium webdriver. Can i do test coverage in automation? Regards, varghese |
From: John W. L. <Joh...@sa...> - 2013-02-22 06:16:56
|
I should have said instrument the classes. However, you can instrument jars, wars, ears, and Cobertura will open them up and instrument the classes inside them. From: Varghese Renny [mailto:var...@gm...] Sent: Friday, February 22, 2013 12:05 AM To: John W. Lewis Cc: cob...@li... Subject: Re: [Cobertura-devel] How to use Cobertura with Selenium webdriver? Thanks for the reply.. HI lewis, I don't get the instrument the jar file step. Below step are correct?..Any mistake is there. 1. Automaton project should be web project..Instrumented the src folder(using cobertura jar file) . So i got one instrumented classes in build folder. 2. I created war file 3. Deploy to webserver. 4.Run my testcases against the deployed application 5.Shutdown the webserver 6.Run the report. On Fri, Feb 22, 2013 at 3:53 AM, John W. Lewis <Joh...@sa...<mailto:Joh...@sa...>> wrote: Yes. It will work. You instrument the jars; deploy them to your web server; run your selenium tests; shutdown the web server (or use the flushCobertura.war); run the report. From: Varghese Renny [mailto:var...@gm...<mailto:var...@gm...>] Sent: Thursday, February 21, 2013 3:31 AM To: cob...@li...<mailto:cob...@li...> Subject: [Cobertura-devel] How to use Cobertura with Selenium webdriver? Hi, I need to know the possible of cobertura with automation framework -selenium webdriver. Can i do test coverage in automation? Regards, varghese |
From: Varghese R. <var...@gm...> - 2013-02-22 05:04:48
|
Thanks for the reply.. HI lewis, I don't get the instrument the jar file step. Below step are correct?..Any mistake is there. 1. Automaton project should be web project..Instrumented the src folder(using cobertura jar file) . So i got one instrumented classes in build folder. 2. I created war file 3. Deploy to webserver. 4.Run my testcases against the deployed application 5.Shutdown the webserver 6.Run the report. On Fri, Feb 22, 2013 at 3:53 AM, John W. Lewis <Joh...@sa...> wrote: > ** ** > > Yes. It will work. You instrument the jars; deploy them to your web > server; run your selenium tests; shutdown the web server (or use the > flushCobertura.war); run the report.**** > > ** ** > > ** ** > > *From:* Varghese Renny [mailto:var...@gm...] > *Sent:* Thursday, February 21, 2013 3:31 AM > *To:* cob...@li... > *Subject:* [Cobertura-devel] How to use Cobertura with Selenium webdriver? > **** > > ** ** > > Hi, > I need to know the possible of cobertura with automation framework > -selenium webdriver. Can i do test coverage in automation? > > > > Regards, > varghese**** > |
From: John W. L. <Joh...@sa...> - 2013-02-21 22:23:59
|
Yes. It will work. You instrument the jars; deploy them to your web server; run your selenium tests; shutdown the web server (or use the flushCobertura.war); run the report. From: Varghese Renny [mailto:var...@gm...] Sent: Thursday, February 21, 2013 3:31 AM To: cob...@li... Subject: [Cobertura-devel] How to use Cobertura with Selenium webdriver? Hi, I need to know the possible of cobertura with automation framework -selenium webdriver. Can i do test coverage in automation? Regards, varghese |
From: Varghese R. <var...@gm...> - 2013-02-21 08:30:44
|
Hi, I need to know the possible of cobertura with automation framework -selenium webdriver. Can i do test coverage in automation? Regards, varghese |
From: Jeevan C. <cha...@gm...> - 2013-02-21 07:13:01
|
Thanks Steve, that really helped me. I changed the instrumented.dir property to be an absolute path instead of the relative path defined earlier. Now, I can see the Line and Branch Coverage figures correctly. Regards, Jeevan On Thu, Feb 21, 2013 at 11:28 AM, Steven Christou <sch...@gm...>wrote: > On 02/20/2013 11:05 PM, Jeevan Chamarthi wrote: > > Yes Steven, > > I couldn't see the *Cobertura: Loaded information on X classes* at the > end of junit run but I could see similar output during cobertura-instrument > task. > > Which classpath are you referring to, cobertura or the instrumented and > uninstrumented classes within the junit task? > > Regards, > Jeevan > > On Wed, Feb 20, 2013 at 7:30 PM, Steven Christou <sch...@gm...>wrote: > >> On 02/20/2013 04:19 AM, Jeevan Chamarthi wrote: >> >> Hi, >> >> I had a strange problem while running cobertura code coverage report on >> one of my ant & junit based java project. The code coverage shows zero for >> all packages despite the fact the unit tests are running fine. >> >> Pasted below are the different tasks added to the ant build xml to get >> this running: >> >> *Classpath:* >> >> <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"/> >> >> *Instrument:* >> >> <property name="instrumented.dir" >> value="dist/instrumented-classes" /> >> >> <target name="instrument" depends="init,compile"> >> <delete file="cobertura.ser"/> >> <delete dir="${instrumented.dir}" /> >> <cobertura-instrument todir="${instrumented.dir}" >> datafile="cobertura.ser"> >> <fileset dir="${dist.classes.dir}"> >> <include name="**/*.class"/> >> <exclude name="**/*Test*"/> >> </fileset> >> </cobertura-instrument> >> </target> >> >> Junit Test: >> >> <target name="module-test" >> depends="module-compile,module-test-postgresql"> >> <echo level="info" message="Running JUnit test cases..." >> /> >> <junit fork="yes" showoutput="yes" printsummary="yes" >> reloading="false" >> failureProperty="test.failed"> >> >> <jvmarg value="-enableassertions" /> >> <sysproperty >> key="net.sourceforge.cobertura.datafile" file="cobertura.ser" /> >> <classpath location="${instrumented.dir}" /> >> <classpath location="${dist.classes.dir}" /> >> <classpath refid="cobertura.classpath" /> >> <formatter type="xml" /> >> <batchtest todir="${module.test.dir}"> >> <fileset refid="test.src.set" /> >> </batchtest> >> </junit> >> </target> >> >> *Code coverage:* >> >> <target name="code-coverage"> >> <cobertura-report format="html" >> srcdir="${examinet.dir}/common/src" destdir="dist/cobertura-report" >> datafile="cobertura.ser" /> >> </target> >> >> I have the run the following command which went fine but resulting a zero >> code coverage. >> >> *$ ant instrument module-test code-coverage* >> >> Please help me with what went wrong with the above configuration that is >> resulting in a zero code coverage across all packages. >> >> Regards, >> Jeevan >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today:http://p.sf.net/sfu/appdyn_d2d_feb >> >> >> >> _______________________________________________ >> Cobertura-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cobertura-devel >> >> At the end of the junit run (Or anywhere while the tests are running), >> do you see: >> >> Cobertura: Loaded information on X classes. >> Cobertura: Saved information on X classes. >> >> Where X is the number of instrumented classes. If not then it could be >> something wrong with the classpath, even though you define it. >> >> > The issue is the junit target. It does not get the proper classpath, > otherwise you would see the Loaded/Saved information. > > <classpath location="${instrumented.dir}" /> > <classpath location="${dist.classes.dir}" /> > <classpath refid="cobertura.classpath" /> > > The part above is most likely the root cause of the issue. Even though you > define it something else is happening where it does not get the > instrumented code (It's been a while since I've used ant). > > Try this instead: > <classpath> > <fileset dir="${instrumented.dir}" includes="**/*.class"/> > <fileset dir="${dist.classes.dir}" includes="**/*.class"/> > <path refid="cobertura.classpath" /> > </classpath> > > Hopefully that resolves the issue. > > Thanks, > Steve. > |
From: Steven C. <sch...@gm...> - 2013-02-21 05:58:53
|
On 02/20/2013 11:05 PM, Jeevan Chamarthi wrote: > Yes Steven, > > I couldn't see the *Cobertura: Loaded information on X classes* at the > end of junit run but I could see similar output during > cobertura-instrument task. > > Which classpath are you referring to, cobertura or the instrumented > and uninstrumented classes within the junit task? > > Regards, > Jeevan > > On Wed, Feb 20, 2013 at 7:30 PM, Steven Christou > <sch...@gm... <mailto:sch...@gm...>> wrote: > > On 02/20/2013 04:19 AM, Jeevan Chamarthi wrote: >> Hi, >> >> I had a strange problem while running cobertura code coverage >> report on one of my ant & junit based java project. The code >> coverage shows zero for all packages despite the fact the unit >> tests are running fine. >> >> Pasted below are the different tasks added to the ant build xml >> to get this running: >> >> *Classpath:* >> >> <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"/> >> >> *Instrument:* >> >> <property name="instrumented.dir" >> value="dist/instrumented-classes" /> >> >> <target name="instrument" depends="init,compile"> >> <delete file="cobertura.ser"/> >> <delete dir="${instrumented.dir}" /> >> <cobertura-instrument todir="${instrumented.dir}" >> datafile="cobertura.ser"> >> <fileset dir="${dist.classes.dir}"> >> <include name="**/*.class"/> >> <exclude name="**/*Test*"/> >> </fileset> >> </cobertura-instrument> >> </target> >> >> Junit Test: >> >> <target name="module-test" >> depends="module-compile,module-test-postgresql"> >> <echo level="info" message="Running JUnit test >> cases..." /> >> <junit fork="yes" showoutput="yes" >> printsummary="yes" reloading="false" >> failureProperty="test.failed"> >> >> <jvmarg value="-enableassertions" /> >> <sysproperty >> key="net.sourceforge.cobertura.datafile" file="cobertura.ser" /> >> <classpath location="${instrumented.dir}" /> >> <classpath location="${dist.classes.dir}" /> >> <classpath refid="cobertura.classpath" /> >> <formatter type="xml" /> >> <batchtest todir="${module.test.dir}"> >> <fileset refid="test.src.set" /> >> </batchtest> >> </junit> >> </target> >> >> *Code coverage:* >> >> <target name="code-coverage"> >> <cobertura-report format="html" >> srcdir="${examinet.dir}/common/src" >> destdir="dist/cobertura-report" datafile="cobertura.ser" /> >> </target> >> >> I have the run the following command which went fine but >> resulting a zero code coverage. >> >> *$ ant instrument module-test code-coverage* >> >> Please help me with what went wrong with the above configuration >> that is resulting in a zero code coverage across all packages. >> >> Regards, >> Jeevan >> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_feb >> >> >> _______________________________________________ >> Cobertura-devel mailing list >> Cob...@li... <mailto:Cob...@li...> >> https://lists.sourceforge.net/lists/listinfo/cobertura-devel > At the end of the junit run (Or anywhere while the tests are > running), do you see: > > Cobertura: Loaded information on X classes. > Cobertura: Saved information on X classes. > > Where X is the number of instrumented classes. If not then it > could be something wrong with the classpath, even though you > define it. > > The issue is the junit target. It does not get the proper classpath, otherwise you would see the Loaded/Saved information. <classpath location="${instrumented.dir}" /> <classpath location="${dist.classes.dir}" /> <classpath refid="cobertura.classpath" /> The part above is most likely the root cause of the issue. Even though you define it something else is happening where it does not get the instrumented code (It's been a while since I've used ant). Try this instead: <classpath> <fileset dir="${instrumented.dir}" includes="**/*.class"/> <fileset dir="${dist.classes.dir}" includes="**/*.class"/> <path refid="cobertura.classpath" /> </classpath> Hopefully that resolves the issue. Thanks, Steve. |
From: Jeevan C. <cha...@gm...> - 2013-02-21 05:05:34
|
Yes Steven, I couldn't see the *Cobertura: Loaded information on X classes* at the end of junit run but I could see similar output during cobertura-instrument task. Which classpath are you referring to, cobertura or the instrumented and uninstrumented classes within the junit task? Regards, Jeevan On Wed, Feb 20, 2013 at 7:30 PM, Steven Christou <sch...@gm...>wrote: > On 02/20/2013 04:19 AM, Jeevan Chamarthi wrote: > > Hi, > > I had a strange problem while running cobertura code coverage report on > one of my ant & junit based java project. The code coverage shows zero for > all packages despite the fact the unit tests are running fine. > > Pasted below are the different tasks added to the ant build xml to get > this running: > > *Classpath:* > > <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"/> > > *Instrument:* > > <property name="instrumented.dir" > value="dist/instrumented-classes" /> > > <target name="instrument" depends="init,compile"> > <delete file="cobertura.ser"/> > <delete dir="${instrumented.dir}" /> > <cobertura-instrument todir="${instrumented.dir}" > datafile="cobertura.ser"> > <fileset dir="${dist.classes.dir}"> > <include name="**/*.class"/> > <exclude name="**/*Test*"/> > </fileset> > </cobertura-instrument> > </target> > > Junit Test: > > <target name="module-test" > depends="module-compile,module-test-postgresql"> > <echo level="info" message="Running JUnit test cases..." /> > <junit fork="yes" showoutput="yes" printsummary="yes" > reloading="false" > failureProperty="test.failed"> > > <jvmarg value="-enableassertions" /> > <sysproperty > key="net.sourceforge.cobertura.datafile" file="cobertura.ser" /> > <classpath location="${instrumented.dir}" /> > <classpath location="${dist.classes.dir}" /> > <classpath refid="cobertura.classpath" /> > <formatter type="xml" /> > <batchtest todir="${module.test.dir}"> > <fileset refid="test.src.set" /> > </batchtest> > </junit> > </target> > > *Code coverage:* > > <target name="code-coverage"> > <cobertura-report format="html" > srcdir="${examinet.dir}/common/src" destdir="dist/cobertura-report" > datafile="cobertura.ser" /> > </target> > > I have the run the following command which went fine but resulting a zero > code coverage. > > *$ ant instrument module-test code-coverage* > > Please help me with what went wrong with the above configuration that is > resulting in a zero code coverage across all packages. > > Regards, > Jeevan > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today:http://p.sf.net/sfu/appdyn_d2d_feb > > > > _______________________________________________ > Cobertura-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > At the end of the junit run (Or anywhere while the tests are running), do > you see: > > Cobertura: Loaded information on X classes. > Cobertura: Saved information on X classes. > > Where X is the number of instrumented classes. If not then it could be > something wrong with the classpath, even though you define it. > > |
From: Steven C. <sch...@gm...> - 2013-02-20 14:00:54
|
On 02/20/2013 04:19 AM, Jeevan Chamarthi wrote: > Hi, > > I had a strange problem while running cobertura code coverage report > on one of my ant & junit based java project. The code coverage shows > zero for all packages despite the fact the unit tests are running fine. > > Pasted below are the different tasks added to the ant build xml to get > this running: > > *Classpath:* > > <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"/> > > *Instrument:* > > <property name="instrumented.dir" > value="dist/instrumented-classes" /> > > <target name="instrument" depends="init,compile"> > <delete file="cobertura.ser"/> > <delete dir="${instrumented.dir}" /> > <cobertura-instrument todir="${instrumented.dir}" > datafile="cobertura.ser"> > <fileset dir="${dist.classes.dir}"> > <include name="**/*.class"/> > <exclude name="**/*Test*"/> > </fileset> > </cobertura-instrument> > </target> > > Junit Test: > > <target name="module-test" > depends="module-compile,module-test-postgresql"> > <echo level="info" message="Running JUnit test > cases..." /> > <junit fork="yes" showoutput="yes" printsummary="yes" > reloading="false" > failureProperty="test.failed"> > > <jvmarg value="-enableassertions" /> > <sysproperty > key="net.sourceforge.cobertura.datafile" file="cobertura.ser" /> > <classpath location="${instrumented.dir}" /> > <classpath location="${dist.classes.dir}" /> > <classpath refid="cobertura.classpath" /> > <formatter type="xml" /> > <batchtest todir="${module.test.dir}"> > <fileset refid="test.src.set" /> > </batchtest> > </junit> > </target> > > *Code coverage:* > > <target name="code-coverage"> > <cobertura-report format="html" > srcdir="${examinet.dir}/common/src" destdir="dist/cobertura-report" > datafile="cobertura.ser" /> > </target> > > I have the run the following command which went fine but resulting a > zero code coverage. > > *$ ant instrument module-test code-coverage* > > Please help me with what went wrong with the above configuration that > is resulting in a zero code coverage across all packages. > > Regards, > Jeevan > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > > > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel At the end of the junit run (Or anywhere while the tests are running), do you see: Cobertura: Loaded information on X classes. Cobertura: Saved information on X classes. Where X is the number of instrumented classes. If not then it could be something wrong with the classpath, even though you define it. |
From: Jeevan C. <cha...@gm...> - 2013-02-20 10:19:47
|
Hi, I had a strange problem while running cobertura code coverage report on one of my ant & junit based java project. The code coverage shows zero for all packages despite the fact the unit tests are running fine. Pasted below are the different tasks added to the ant build xml to get this running: *Classpath:* <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"/> *Instrument:* <property name="instrumented.dir" value="dist/instrumented-classes" /> <target name="instrument" depends="init,compile"> <delete file="cobertura.ser"/> <delete dir="${instrumented.dir}" /> <cobertura-instrument todir="${instrumented.dir}" datafile="cobertura.ser"> <fileset dir="${dist.classes.dir}"> <include name="**/*.class"/> <exclude name="**/*Test*"/> </fileset> </cobertura-instrument> </target> Junit Test: <target name="module-test" depends="module-compile,module-test-postgresql"> <echo level="info" message="Running JUnit test cases..." /> <junit fork="yes" showoutput="yes" printsummary="yes" reloading="false" failureProperty="test.failed"> <jvmarg value="-enableassertions" /> <sysproperty key="net.sourceforge.cobertura.datafile" file="cobertura.ser" /> <classpath location="${instrumented.dir}" /> <classpath location="${dist.classes.dir}" /> <classpath refid="cobertura.classpath" /> <formatter type="xml" /> <batchtest todir="${module.test.dir}"> <fileset refid="test.src.set" /> </batchtest> </junit> </target> *Code coverage:* <target name="code-coverage"> <cobertura-report format="html" srcdir="${examinet.dir}/common/src" destdir="dist/cobertura-report" datafile="cobertura.ser" /> </target> I have the run the following command which went fine but resulting a zero code coverage. *$ ant instrument module-test code-coverage* Please help me with what went wrong with the above configuration that is resulting in a zero code coverage across all packages. Regards, Jeevan |
From: Steven C. <sch...@gm...> - 2013-02-12 11:34:44
|
On 02/12/2013 04:05 AM, Himani Khanna wrote: > Hi All, > > I have a scenario where the tomcat stop doesn't allow the tomcat > engine to stop as some process in my app had created threads which are > not released on stopping the tomcat and thus we have to kill the > tomcat instance PID's. But after killing the tomcat the cobertura > reports doesn't seem to flush the data and the reports show 0% coverage. > > Is there any other way for flushing the cobertura coverage result > other than code hacks? > > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > > > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel Cobertura flushes it's data when the java shutdown hooks are executed. However there is a way to execute a flush without extra code. Since you're using tomcat you can deploy the coberturaFlush.war file as part of your container and invoke a flush by going to http://<URL>:<PORT>/FlushCobertufa/flushCobertura to flush the data. |
From: Himani K. <him...@gm...> - 2013-02-12 10:06:05
|
Hi All, I have a scenario where the tomcat stop doesn't allow the tomcat engine to stop as some process in my app had created threads which are not released on stopping the tomcat and thus we have to kill the tomcat instance PID's. But after killing the tomcat the cobertura reports doesn't seem to flush the data and the reports show 0% coverage. Is there any other way for flushing the cobertura coverage result other than code hacks? |