Comments on: Getting started with Cobertura – A Java Code Coverage Tool https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/ Friends of Oracle and Java Wed, 24 Jun 2015 09:59:44 +0000 hourly 1 http://wordpress.org/?v=4.2.2 By: vaishali https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3074 Thu, 15 Mar 2007 19:09:54 +0000 http://technology.amis.nl/blog/?p=1140#comment-3074 Hi all, thanx Jeroen for the reply….but it does not resolve my issue I am facing problem with cobertura coverage report generation.I am using Maven2.0.4 ,Eclipse 3.1, Jdk1.4.And while trying to generate the report after executing mvn site command getting the following error:

[INFO] Error getting reports from the plugin ‘org.codehaus.mojo:cobertura-maven-
plugin': Unable to find the mojo ‘org.codehaus.mojo:cobertura-maven-plugin:2.0:c
obertura’ in the plugin ‘org.codehaus.mojo:cobertura-maven-plugin’
org/apache/maven/reporting/AbstractMavenReport

If you could reply as soon as possible,any help from your side will be appreciated…..

]]>
By: vaishali https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3073 Thu, 15 Mar 2007 19:08:45 +0000 http://technology.amis.nl/blog/?p=1140#comment-3073 Hi all, thanx Jeroen for the reply….but it does not resolve my issue I am facing problem with cobertura coverage report generation.I am using Maven2.0.4 ,Eclipse 3.1, Jdk1.4.And while trying to generate the report after executing mvn site command getting the following error:

[INFO] Error getting reports from the plugin ‘org.codehaus.mojo:cobertura-maven-
plugin': Unable to find the mojo ‘org.codehaus.mojo:cobertura-maven-plugin:2.0:c
obertura’ in the plugin ‘org.codehaus.mojo:cobertura-maven-plugin’
org/apache/maven/reporting/AbstractMavenReport

If you could reply as soon as possible,any help from your side will be appreciated.

]]>
By: Jeroen van Wilgenburg https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3072 Tue, 27 Feb 2007 09:15:56 +0000 http://technology.amis.nl/blog/?p=1140#comment-3072 The file cobertura-instrument is probably not available on your path. In windows you have to put the directory where Cobertura is installed in the list at the PATH entry. Right click my computer, properties, advanced, enviroment variables and add the cobertura directory at the variable PATH at the user section (when there is no PATH, create it)

]]>
By: vaishali https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3071 Thu, 22 Feb 2007 12:12:19 +0000 http://technology.amis.nl/blog/?p=1140#comment-3071 cobertura-instrument target\classes\.

cobertura-report –format html –destination c:\temp\cobertura –source src\main\java

Can anybody please, help me out with this?
These commands are not working for me.result of execution goes like:
‘cobertura-report’ is not recognized as an internal or external command,
operable program or batch file.

‘cobertura-instrument’ is not recognized as an internal or external command,
operable program or batch file.

]]>
By: Tomek https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3070 Mon, 20 Nov 2006 12:24:45 +0000 http://technology.amis.nl/blog/?p=1140#comment-3070 Hi,
I have written a short clover vs. cobertura comparision, maybe you’ll find it useful

Tomek

]]>
By: Sachi https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3069 Fri, 06 Oct 2006 18:35:45 +0000 http://technology.amis.nl/blog/?p=1140#comment-3069 Hi Jeroen,
That plugin supports cobertura 1.7.
I want a plugin which supports cobertura 1.8.
Thanks,
Sachi

]]>
By: Jeroen van Wilgenburg https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3068 Fri, 06 Oct 2006 14:50:13 +0000 http://technology.amis.nl/blog/?p=1140#comment-3068 The plugin is located on the Ibiblio repository:
http://www.ibiblio.org/maven2/org/codehaus/mojo/cobertura-maven-plugin/2.0/

]]>
By: Sachi https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3067 Thu, 05 Oct 2006 12:27:11 +0000 http://technology.amis.nl/blog/?p=1140#comment-3067 Hi Piyush,
I am trying to locate the cobertura-maven-plugin for maven 2 and cobertura 1.8.
Where did you get that plugin?
Thanks,
Sachi

]]>
By: Piyush https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3066 Wed, 26 Jul 2006 21:13:03 +0000 http://technology.amis.nl/blog/?p=1140#comment-3066 Hi All,
I’m using Maven 2.0.4 and Coubertura 1.8. I’ve no issues producing reports when executing the steps as mentioned in the conclusion. But When I use Maven and do mvn cobertura:cobertura, I get a Null Pointer Exception. There is no problem in instrumenting the classes thou’.
For your reference I’m providing the stack trace.

[ERROR] Exception in thread “main” java.lang.NullPointerException
at net.sourceforge.cobertura.coveragedata.ProjectData.getSourceFiles(Pro
jectData.java:105)
at net.sourceforge.cobertura.reporting.html.HTMLReport.generateSourceFil
eList(HTMLReport.java:167)
at net.sourceforge.cobertura.reporting.html.HTMLReport.generateSourceFil
eLists(HTMLReport.java:150)
at net.sourceforge.cobertura.reporting.html.HTMLReport.(HTMLReport
.java:79)
at net.sourceforge.cobertura.reporting.Main.parseArguments(Main.java:100
)
at net.sourceforge.cobertura.reporting.Main.main(Main.java:161)

Can anyone please guide me as to what I’m missing.

Thanks in advance,
Piyush

]]>
By: Jeroen van Wilgenburg https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3065 Thu, 18 May 2006 09:34:48 +0000 http://technology.amis.nl/blog/?p=1140#comment-3065 I think there’s no plugin for Eclipse, but there is for JClover and both applications are quite similar, so it shouldn’t be too difficult to convert the JClover plugin I guess.

What exactly do you mean with create your own instrument classes? Instrumenting a class is nothing more than some byte code manipulation of compiled classes.

]]>
By: Richa https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3064 Tue, 16 May 2006 14:14:23 +0000 http://technology.amis.nl/blog/?p=1140#comment-3064 Any one of you have idea that on the basis of what we can create our own instrument classes or is there any eclipse plugin for j-cobertura and eclipse.

Thanks & Regards
Richa

]]>
By: Jeroen van Wilgenburg https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3063 Wed, 12 Apr 2006 08:25:15 +0000 http://technology.amis.nl/blog/?p=1140#comment-3063 I found out how to use the maven2 plugin.
First check out the cobertura-maven-plugin from the Codehaus svn repository
https://svn.mojo.codehaus.org/mojo/trunk/mojo

Then do a mvn install
Include the basic Cobertura configuration from the Codehaus site in your project: http://mojo.codehaus.org/cobertura-maven-plugin/usage.html

When you do mvn cobertura:cobertura a report can be found in target/site/cobertura

]]>
By: Lucas Jellema https://technology.amis.nl/2006/04/07/getting-started-with-cobertura/#comment-3062 Tue, 11 Apr 2006 22:30:56 +0000 http://technology.amis.nl/blog/?p=1140#comment-3062 Release 1.8 of Cobertura just was published: After 4 long months we’ve released Cobertura 1.8! Lots of good changes in this release: show the total number of lines and branches in the HTML report, support for Groovy, allow multiple JVMs to cleanly write to the same data file, and more robust instrumentation of archives (and even archives inside of archives!). See
http://cobertura.sourceforge.net/

]]>