First release of Patchwork coverage maven plugin
8 answers - 1216 bytes -

Hi to all,
Following some discussions on the agile-testing mailing list, I
revived an old project of mine named Patchwork, that aims to provide a
general purpose and extensible code coverage framework. In the spirit
of "release early, release often", I just released first public
version of this tool, numbered 1 (no dots). It is currently available
at:
This first version has the following features:
- compute all-nodes, all-edges or both coverage metrics from the
control flow graph of Java bytecode, with percentage and source
colorizing to show executed lines,
- provide CLI and maven 2 plugin interfaces,
- provide a small GUI utility for visualizing control flow graph and
data-flow graphs of bytecode.
Known limitations are:
- reports are ugly,
- Due to , the maven plugin
still needs to execute twice the tests,
- does not yet work on itself,
- alpha development stage,
- probably tons of subtle bugs.
It is different from other tools in the way it computes coverage and
provide somewhat finer grained measures than at least cobertura.
I would welcome feedback, advices, kind comments and of course any
help.
No.1 | | 1582 bytes |
| 
Arnaud, thanks for sharing this. To better support the community and its
feedback, I would recommend that you provide a project mailing list/forum
and a bug reporting facility.
As an note, I tried the mvn plugin and I got a "
"
and multiple "Unknown attirbute ".
Thank you,
2/23/07, Arnaud Bailly <abailly (AT) oqube (DOT) comwrote:
Hi to all,
Following some discussions on the agile-testing mailing list, I
revived an old project of mine named Patchwork, that aims to provide a
general purpose and extensible code coverage framework. In the spirit
of "release early, release often", I just released first public
version of this tool, numbered 1 (no dots). It is currently available
at:
This first version has the following features:
- compute all-nodes, all-edges or both coverage metrics from the
control flow graph of Java bytecode, with percentage and source
colorizing to show executed lines,
- provide CLI and maven 2 plugin interfaces,
- provide a small GUI utility for visualizing control flow graph and
data-flow graphs of bytecode.
Known limitations are:
- reports are ugly,
- Due to , the maven plugin
still needs to execute twice the tests,
- does not yet work on itself,
- alpha development stage,
- probably tons of subtle bugs.
It is different from other tools in the way it computes coverage and
provide somewhat finer grained measures than at least cobertura.
I would welcome feedback, advices, kind comments and of course any
help.
No.2 | | 1753 bytes |
| 
I could not find docs on the "3 columns" of the patchwork.html report (what
are the values of each column?). Do you have a doc page on that?
I am very interested in solving the misleading "100% coverage" report of
existing tools. If patchwork can really do that, you have a big hit
underway.
Message
From: Arnaud Bailly [mailto:abailly (AT) oqube (DOT) com]
Sent: Friday, February 23, 2007 3:15 PM
To: users (AT) maven (DOT) apache.org
Subject: [ANN] First release of Patchwork coverage maven plugin
Hi to all,
Following some discussions on the agile-testing mailing list, I revived an
old project of mine named Patchwork, that aims to provide a general purpose
and extensible code coverage framework. In the spirit of "release early,
release often", I just released first public version of this tool, numbered
1 (no dots). It is currently available
at:
This first version has the following features:
- compute all-nodes, all-edges or both coverage metrics from the control
flow graph of Java bytecode, with percentage and source colorizing to show
executed lines,
- provide CLI and maven 2 plugin interfaces,
- provide a small GUI utility for visualizing control flow graph and
data-flow graphs of bytecode.
Known limitations are:
- reports are ugly,
- Due to , the maven plugin
still needs to execute twice the tests,
- does not yet work on itself,
- alpha development stage,
- probably tons of subtle bugs.
It is different from other tools in the way it computes coverage and provide
somewhat finer grained measures than at least cobertura.
I would welcome feedback, advices, kind comments and of course any help.
No.3 | | 793 bytes |
| 
Hello,
Thank for your feedback. I will setup a ML (or better, move the thing
to sourceforge ASAP0). As for the errors you noticed, I think they are
not blocking but here are some explanations:
-
this comes from a class
constructor that calls Class.forName() but the class is not there as
it is in an extension for jhighlight that I hove taken out of the
dependencies, waiting for upgrading of jhighlight with a patch I
submitted (BTW, this is entirely up to me as the patch is not correct
wrt coding conventions of the project)
- Unknown attirbute : this
error is logged by patchwork-bytes when it parses a class file and
find an attribute that it does not know. There is another one,
BridgeMethod, that should be supported.
Regards,
No.4 | | 759 bytes |
| 
"Jeff Jensen" <jeffjensen (AT) upstairstechnology (DOT) comwrites:
I could not find docs on the "3 columns" of the patchwork.html report (what
are the values of each column?). Do you have a doc page on that?
col 1 = total number of "blocks" executed (useful to know which
method is most often used)
col 2 = maximum number of coverage unit for method/class/package (ie. edges
or nodes)
col 3 = number of coverage unit actually covered
col 4 = coverage percentile
I will update documentation asap.
I am very interested in solving the misleading "100% coverage" report of
existing tools. If patchwork can really do that, you have a big hit
underway.
Did patchwork work for you ?
regards,
No.5 | | 2175 bytes |
| 
Hi!
Just wanted to try out the patchwork-maven-plugin but it fails with the
following exception (actually it doesn't fail, but maven says
"Build Successful". However, I didn't get a report):
$ mvn patchwork:test
[]
Error while defining
at (Native Method)
at (ClassLoader.java:620)
at (ClassLoader.java:465)
at (ByteArrayClassLoader.java:76)
at (ByteArrayClassLoader.java:128)
at (CompoundClassLoader.java:76)
at (ClassLoader.java:306)
at (ClassLoader.java:299)
at (ClassLoader.java:251)
at (ClassLoader.java:319)
at (Native Method)
at (ClassLoader.java:620)
at (ClassLoader.java:465)
at (ByteArrayClassLoader.java:76)
at (ByteArrayClassLoader.java:128)
at (CompoundClassLoader.java:76)
at (ClassLoader.java:306)
at (ClassLoader.java:299)
at (ClassLoader.java:251)
at (ClassLoader.java:319)
at (Native Method)
at (ClassLoader.java:620)
at (ClassLoader.java:465)
at (ByteArrayClassLoader.java:76)
at (ByteArrayClassLoader.java:128)
at (CompoundClassLoader.java:76)
at (ClassLoader.java:306)
at (ClassLoader.java:299)
at (ClassLoader.java:251)
at (ClassLoader.java:319)
at (Native Method)
at (Class.java:2357)
at (Class.java:2671)
at java.lang.Class.getConstructor(Class.java:1629)
at (TestSuite.java:177)
at junit.framework.TestSuite.<init>(TestSuite.java:59)
at (JUnitRunner.java:100)
at (TestRunner.java:350)
at oqube.patchwork.TestRunner.run(TestRunner.java:510 )
at (PatchworkMojo.java:184)
at (DefaultPluginManager.java:412)
at ()
at ()
at ()
at ()
at ()
at ()
at (DefaultMaven.java:322)
at (DefaultMaven.java:115)
at (MavenCli.java:256)
at (Native Method)
at ()
at ()
at (Method.java:585)
at (Launcher.java:315)
at (Launcher.java:255)
at (Launcher.java:430)
at (Launcher.java:375)
The missing class is an interface from
a third-party dependency which is defined with scope 'compile' in my
pom.xml. It seems that the corresponding JAR is not in the classpath.
- martin
No.6 | | 902 bytes |
| 
Martin Hoeller <martin (AT) xss (DOT) co.atwrites:
Hi!
Just wanted to try out the patchwork-maven-plugin but it fails with the
following exception (actually it doesn't fail, but maven says
"Build Successful". However, I didn't get a report):
Hello Martin,
Thank you for trying patchwork.
The missing class is an interface from
a third-party dependency which is defined with scope 'compile' in my
pom.xml. It seems that the corresponding JAR is not in the classpath.
I can see the problem and will fix it for next release. As for the
"Build Succesful", I do not feel sensible right now to make the build
fail due to errors in my plugin !
BTW, I have set up a google group for exchanging on pathcwork. The
mail address is :
patchwork-users (AT) googlegroups (DOT) com
and the home page is
Regards,
No.7 | | 1704 bytes |
| 
Thanks for the explanation.
At my current customer, we use Maven 1, so haven't tried it. I have read
the Patchwork docs, and am very intrigued by the solution to the misleading
"100%" coverage. I would switch them to Patchwork for that reason, if it
proves to work very well as you evolve it (and a Maven 1 plugin exists! :-).
It is a huge system, with over 11,000 classes across all components, so the
tools need to work well.
Have you thought of joining Cobertura and enhancing it to do that (or is
that an uphill battle, not easily possible due to design, etc.), vs
continuing to make a another one? There are pros and cons to everything,
and I wonder your thoughts on that
Message
From: Arnaud Bailly [mailto:abailly (AT) oqube (DOT) com]
Sent: Monday, February 26, 2007 1:44 AM
To: Maven Users List
Subject: Re: [ANN] First release of Patchwork coverage maven plugin
"Jeff Jensen" <jeffjensen (AT) upstairstechnology (DOT) comwrites:
I could not find docs on the "3 columns" of the patchwork.html report
(what
are the values of each column?). Do you have a doc page on that?
col 1 = total number of "blocks" executed (useful to know which
method is most often used)
col 2 = maximum number of coverage unit for method/class/package (ie. edges
or nodes)
col 3 = number of coverage unit actually covered
col 4 = coverage percentile
I will update documentation asap.
I am very interested in solving the misleading "100% coverage" report of
existing tools. If patchwork can really do that, you have a big hit
underway.
Did patchwork work for you ?
regards,
No.8 | | 341 bytes |
| 
Arnaud Bailly-3 wrote:
I will setup a ML (or better, move the thing to sourceforge ASAP0
I find sourceforge painfull, if you are going to go with external hosting,
what about these:
- http://code.google.com/
- http://www.devjavu.com/ (hosted Trac and SVN)
- http://www.javaforge.com
Any other suggestions?