Java Open Source Projects Directory

...dedicated into Java open source projects

  • Increase font size
  • Default font size
  • Decrease font size


Hansel decorates a JUnit Test class and instruments one or more classes under test to verify 100% branch coverage of the tested classes by the Test class. The Hansel-decorated TestSuite first runs all the test methods in the Test class. If any of these fail, the test fails, ie: Hansel doesn't bother verifying coverage until functional testing is 100% successful. Hansel generates additional Tests, called "Probes," each of which verifies coverage for a single method or branch. Each of these will fail if the method or branch was not covered during executino of the functional tests. Hansel uses the BCEL library to instrument the class(es) under test.