Hansel 2.0


Hansel is an extension to JUnit that adds code coverage testing to the testing framework.

Much of the source code is taken from Gretel a "Residual Test Coverage Monitoring"-Tool developed at the University of Oregon.


The newest version of hansel is available from sourceforge.


What makes Hansel different from other code coverage tools? Most tools try to generate code coverage reports from a test-run of all available tests.

But a much more useful information is how much of the code which a test is supposed to test is covered. Hansel gives you this information.


Hansel 2.X

Hansel requires Java 1.5 , JUnit 4 and ASM to run. To build Hansel, Ant and JDK 1.5 is needed.

Hansel 1.X

Hansel requires Java , JUnit and BCEL 5.0 to run. To build Hansel, Ant and JDK 1.4 is needed.


There is a short tutorial on using Hansel with JUnit 4 (and JUnit 3.8 ).

Also take a look at the FAQ , the documentation of the Ant Task and the Javadocs .


Hansel is offered under a BSD style license.


Please ask questions on the mailing list or submit a bug report .