<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/hansel/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/hansel/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/hansel/bugs/</id><updated>2007-02-08T18:21:13Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Hansel 2 &amp; Junit 4</title><link href="https://sourceforge.net/p/hansel/bugs/47/" rel="alternate"/><published>2007-02-08T18:21:13Z</published><updated>2007-02-08T18:21:13Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netd5a0b98fab6ab1c5cbc0bd2ffd971775ac863bc9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Trying to follow the examples with setting up Hansel 2 based JUnit 4&lt;br /&gt;
tests and I am not able to get the code to execute.&lt;/p&gt;
&lt;p&gt;I have a simple test:&lt;/p&gt;
&lt;p&gt;package com.eds.junit;&lt;/p&gt;
&lt;p&gt;import org.hansel.CoverageRunner;&lt;/p&gt;
&lt;p&gt;import static org.junit.Assert.assertTrue;&lt;br /&gt;
import org.junit.Test;&lt;br /&gt;
import org.junit.runner.JUnitCore;&lt;br /&gt;
import org.junit.runner.RunWith;&lt;br /&gt;
import org.junit.runners.Suite;&lt;/p&gt;
&lt;p&gt;@RunWith(CoverageRunner.class)&lt;br /&gt;
@Suite.SuiteClasses({ SomeTest.class })&lt;br /&gt;
@CoverageRunner.CoverClasses({ Some.class })&lt;br /&gt;
public class SomeTest&lt;br /&gt;
{&lt;br /&gt;
public SomeTest()&lt;br /&gt;
{&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;@Test&lt;br /&gt;
public void xyz()&lt;br /&gt;
{&lt;br /&gt;
Some some = new Some();&lt;br /&gt;
assertTrue("Test", true);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public static void main(String... arguments)&lt;br /&gt;
{&lt;br /&gt;
JUnitCore core = new JUnitCore();&lt;br /&gt;
//core.addListener(new SomeListener());&lt;br /&gt;
core.run(SomeTest.class);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;That tests an even simpler object:&lt;/p&gt;
&lt;p&gt;package com.eds.junit;&lt;/p&gt;
&lt;p&gt;public class Some&lt;br /&gt;
{&lt;br /&gt;
public Some()&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;When I execute this code following the steps in the tutorial I get&lt;br /&gt;
errors, the code works fine without Hansel. We have looked into Hansel&lt;br /&gt;
1.x and got proof of concepts working with that, now since we are&lt;br /&gt;
switching to Java 1.5 we want to start looking at Hansel 2.&lt;/p&gt;
&lt;p&gt;The results that I'm getting are:&lt;/p&gt;
&lt;p&gt;D:\&amp;amp;gt;java -classpath "D:\Program&lt;br /&gt;
Files\Oracle\JDeveloperStudio10.1.3.2\jdev\mywor&lt;br /&gt;
k\JUnit4Application\JUnit4Project\classes;D:\Tools\junit4.1\junit-4.1.ja&lt;br /&gt;
r;D:\Too&lt;br /&gt;
ls\hansel-2.0a3\lib\asm-all-3.0_RC1.jar;D:\Tools\hansel-2.0a3\lib\hansel&lt;br /&gt;
.jar" -j&lt;br /&gt;
avaagent:D:/Tools/hansel-2.0a3/lib/hansel.jar com.eds.junit.SomeTest&lt;br /&gt;
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with&lt;br /&gt;
message&lt;br /&gt;
transform method call failed at&lt;br /&gt;
../../../src/share/instrument/JPLISAgent.c line:&lt;br /&gt;
831&lt;br /&gt;
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with&lt;br /&gt;
message&lt;br /&gt;
transform method call failed at&lt;br /&gt;
../../../src/share/instrument/JPLISAgent.c line:&lt;br /&gt;
831&lt;br /&gt;
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with&lt;br /&gt;
message&lt;br /&gt;
transform method call failed at&lt;br /&gt;
../../../src/share/instrument/JPLISAgent.c line:&lt;br /&gt;
831&lt;br /&gt;
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with&lt;br /&gt;
message&lt;br /&gt;
transform method call failed at&lt;br /&gt;
../../../src/share/instrument/JPLISAgent.c line:&lt;br /&gt;
831&lt;br /&gt;
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with&lt;br /&gt;
message&lt;br /&gt;
transform method call failed at&lt;br /&gt;
../../../src/share/instrument/JPLISAgent.c line:&lt;br /&gt;
831&lt;br /&gt;
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with&lt;br /&gt;
message&lt;br /&gt;
transform method call failed at&lt;br /&gt;
../../../src/share/instrument/JPLISAgent.c line:&lt;br /&gt;
831&lt;/p&gt;
&lt;p&gt;This Assertion Failed error continues on until IllegalState exceptions&lt;br /&gt;
start to get thrown:&lt;/p&gt;
&lt;p&gt;java.lang.IllegalStateException: Inconsistent instrumentation: 9 != 8&lt;br /&gt;
at&lt;br /&gt;
org.hansel.HanselCodeAdapter.visitEnd(HanselCodeAdapter.java:312)&lt;br /&gt;
at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)&lt;br /&gt;
at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)&lt;br /&gt;
at org.objectweb.asm.tree.ClassNode.accept(Unknown Source)&lt;br /&gt;
at org.hansel.Transformer.transform(Transformer.java:47)&lt;br /&gt;
at sun.instrument.TransformerManager.transform(Unknown Source)&lt;br /&gt;
at sun.instrument.InstrumentationImpl.transform(Unknown Source)&lt;br /&gt;
at sun.instrument.InstrumentationImpl.redefineClasses0(Native&lt;br /&gt;
Method)&lt;br /&gt;
at sun.instrument.InstrumentationImpl.redefineClasses(Unknown&lt;br /&gt;
Source)&lt;br /&gt;
at org.hansel.Startup.init(Startup.java:97)&lt;br /&gt;
at org.hansel.CoverageRunner.init(CoverageRunner.java:78)&lt;br /&gt;
at&lt;br /&gt;
org.hansel.CoverageRunner.getDescription(CoverageRunner.java:116)&lt;br /&gt;
at&lt;br /&gt;
org.junit.internal.runners.CompositeRunner.getDescription(CompositeRu&lt;br /&gt;
nner.java:36)&lt;br /&gt;
at&lt;br /&gt;
org.junit.internal.runners.TestClassRunner.getDescription(TestClassRu&lt;br /&gt;
nner.java:57)&lt;br /&gt;
at&lt;br /&gt;
org.hansel.CoverageRunner.getDescription(CoverageRunner.java:119)&lt;br /&gt;
at&lt;br /&gt;
org.junit.internal.runners.CompositeRunner.getDescription(CompositeRu&lt;br /&gt;
nner.java:36)&lt;br /&gt;
at&lt;br /&gt;
org.junit.internal.runners.TestClassRunner.getDescription(TestClassRu&lt;br /&gt;
nner.java:57)&lt;br /&gt;
at&lt;br /&gt;
org.hansel.CoverageRunner.getDescription(CoverageRunner.java:119)&lt;br /&gt;
at&lt;br /&gt;
org.junit.internal.runners.CompositeRunner.getDescription(CompositeRu&lt;/p&gt;
&lt;p&gt;This starts an infinite loop.&lt;/p&gt;
&lt;p&gt;I'm using the latest JUnit 4 release, however I get the same results if&lt;br /&gt;
I use the JUnit distibution that is packaged with Hansel.&lt;/p&gt;
&lt;p&gt;Any help would be appreciated.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Bob Butash (bob.butash@eds.com)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>problem with &lt;java package&gt;.getSpecificationVersion()</title><link href="https://sourceforge.net/p/hansel/bugs/46/" rel="alternate"/><published>2005-02-23T16:17:30Z</published><updated>2005-02-23T16:17:30Z</updated><author><name>Merten Schumann</name><uri>https://sourceforge.net/u/merten/</uri></author><id>https://sourceforge.net348284df7a0982fe3db32c59cfd40e062d062a4f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;in latest Hansel 1.02, I could not run my tests&lt;br /&gt;
(strange failures happened, from my TestCase's setUp()&lt;br /&gt;
methods, something like&lt;br /&gt;
java.lang.ExceptionInInitializerError. Found the reason&lt;br /&gt;
to be this code in a static initialize in one of my&lt;br /&gt;
classes:&lt;/p&gt;
&lt;p&gt;Package pack = Package.getPackage("bla.blu.bli");&lt;br /&gt;
String vers = pack.getSpecificationVersion();&lt;/p&gt;
&lt;p&gt;The second line of code did not work with Hansel ... No&lt;br /&gt;
idea if it's only preventing Hansel from working when&lt;br /&gt;
placed in a static initializer ...&lt;/p&gt;
&lt;p&gt;Works great besides from my issue with this special&lt;br /&gt;
packages stuff!!! :-)&lt;/p&gt;
&lt;p&gt;cu&lt;br /&gt;
Merten&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Inner-inner classes not covered</title><link href="https://sourceforge.net/p/hansel/bugs/45/" rel="alternate"/><published>2004-09-23T15:31:42Z</published><updated>2004-09-23T15:31:42Z</updated><author><name>Harald M. Mueller</name><uri>https://sourceforge.net/u/hmmueller/</uri></author><id>https://sourceforge.net0417c129d5c428e12c80c397a9809cd5ca09c40a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;An inner-inner class is not instrumented. The reason is &lt;br /&gt;
the superfluous if (....$...) in ModifyingClassLoader.&lt;br /&gt;
A test case showing the problem is in the attachment: &lt;br /&gt;
The methods in the inner-inner classes should be shown &lt;br /&gt;
as not-covered.&lt;/p&gt;
&lt;p&gt;... I'll repair this together with the categories, which I &lt;br /&gt;
hopefully will check in in a few days (after much more &lt;br /&gt;
testing).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Instruction: ifle[158](3) -&gt; iconst_0 unknown</title><link href="https://sourceforge.net/p/hansel/bugs/44/" rel="alternate"/><published>2004-09-23T15:16:06Z</published><updated>2004-09-23T15:16:06Z</updated><author><name>Harald M. Mueller</name><uri>https://sourceforge.net/u/hmmueller/</uri></author><id>https://sourceforge.netc540ff498f4c9bf331066969b18515bb979c5fdc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;See the attached file for an example which throws the &lt;br /&gt;
exception&lt;/p&gt;
&lt;p&gt;java.lang.UnsupportedOperationException: Instruction: &lt;br /&gt;
ifle[158](3) -&amp;gt; iconst_0 unknown&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.stack.ComplexAnd.translateBranch&lt;br /&gt;
(ComplexAnd.java:138)&lt;br /&gt;
    at org.hansel.stack.ComplexAnd.getStackEntry&lt;br /&gt;
(ComplexAnd.java:59)&lt;br /&gt;
    at org.hansel.stack.ComplexOr.getStackEntry&lt;br /&gt;
(ComplexOr.java:44)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.stack.StackFactory.checkComplexOperator&lt;br /&gt;
(StackFactory.java:180)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.stack.StackFactory.calculateStackEntries&lt;br /&gt;
(StackFactory.java:203)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.stack.StackFactory.calculateMethodStacks&lt;br /&gt;
(StackFactory.java:82)&lt;br /&gt;
    at org.hansel.Instrumenter.instrument&lt;br /&gt;
(Instrumenter.java:291)&lt;br /&gt;
    at org.hansel.Instrumenter.instrument&lt;br /&gt;
(Instrumenter.java:62)&lt;br /&gt;
    at org.hansel.ModifyingClassLoader.modifyClass&lt;br /&gt;
(ModifyingClassLoader.java:205)&lt;br /&gt;
    at org.apache.bcel.util.ClassLoader.loadClass&lt;br /&gt;
(ClassLoader.java:152)&lt;br /&gt;
    at java.lang.ClassLoader.loadClass&lt;br /&gt;
(ClassLoader.java:255)&lt;br /&gt;
    at org.hansel.ModifyingClassLoader.&amp;lt;init&amp;gt;&lt;br /&gt;
(ModifyingClassLoader.java:108)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.ClassLoaderFactory$InternalClassLoader.&amp;lt;init&amp;gt;&lt;br /&gt;
(ClassLoaderFactory.java:113)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.ClassLoaderFactory.createInternalClassLoader&lt;br /&gt;
(ClassLoaderFactory.java:57)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.ClassLoaderFactory.createClassLoader&lt;br /&gt;
(ClassLoaderFactory.java:75)&lt;br /&gt;
    at &lt;br /&gt;
org.hansel.CoverageDecorator.internalAddTest&lt;br /&gt;
(CoverageDecorator.java:103)&lt;br /&gt;
    at org.hansel.CoverageDecorator.addTestClass&lt;br /&gt;
(CoverageDecorator.java:118)&lt;br /&gt;
    at org.hansel.CoverageDecorator.&amp;lt;init&amp;gt;&lt;br /&gt;
(CoverageDecorator.java:66)&lt;br /&gt;
    at org.hanseltest.TestInt.suite&lt;br /&gt;
(TestInt.java:31)&lt;br /&gt;
    at org.hanseltest.AllTests.suite&lt;br /&gt;
(AllTests.java:98)&lt;br /&gt;
    at &lt;br /&gt;
sun.reflect.NativeMethodAccessorImpl.invoke0(Native &lt;br /&gt;
Method)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Failed to invoke suite(): java.lang.NoSuchMethodError: junit</title><link href="https://sourceforge.net/p/hansel/bugs/43/" rel="alternate"/><published>2004-09-22T11:31:17Z</published><updated>2004-09-22T11:31:17Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.neta14136cf860ec10f1eee78103654c5559572cf70</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have downloaded Hansel 1.0 and we are using JDK1.4.&lt;br /&gt;
I have created a class Example(which is to be tested) &lt;br /&gt;
and a TestCase class ExampleTest.&lt;/p&gt;
&lt;p&gt;In the suite() method of the TestCase class I have &lt;br /&gt;
included the code for initializing the Hansel code &lt;br /&gt;
coverage class as follows:&lt;br /&gt;
public static Test suite() {&lt;/p&gt;
&lt;p&gt;CoverageDecorator cd = new CoverageDecorator&lt;br /&gt;
(new Class[] { Example.class });&lt;/p&gt;
&lt;p&gt;cd.addTestClass(ExampleTest.class);&lt;/p&gt;
&lt;p&gt;cd.setDisplayStatistics(true);&lt;/p&gt;
&lt;p&gt;return cd;&lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;The exception that I get while running the ExampleTest &lt;br /&gt;
class as a JUnit class using WSAD is as follows:&lt;/p&gt;
&lt;p&gt;Failed to invoke suite(): java.lang.NoSuchMethodError: &lt;br /&gt;
junit.framework.TestSuite: method &amp;lt;init&amp;gt;&lt;br /&gt;
(Ljava/lang/Class;Ljava/lang/String;)V not found&lt;/p&gt;
&lt;p&gt;How can this problem be resolved?&lt;/p&gt;
&lt;p&gt;Thanks and Regards,&lt;br /&gt;
Ranjana&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Strange conditions for double compares, e.g. !(x &lt; 0.0 != 0)</title><link href="https://sourceforge.net/p/hansel/bugs/42/" rel="alternate"/><published>2004-09-17T07:53:59Z</published><updated>2004-09-17T07:53:59Z</updated><author><name>Harald M. Mueller</name><uri>https://sourceforge.net/u/hmmueller/</uri></author><id>https://sourceforge.netab7ef833633c80da5176771402cab8fbe2d45565</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;For double comparions, hansel creates strange &lt;br /&gt;
conditions. For example,&lt;/p&gt;
&lt;p&gt;if (x == 0) ...&lt;/p&gt;
&lt;p&gt;where x is a double, creates the output&lt;/p&gt;
&lt;p&gt;Coverage failure: Branch not completely covered. &lt;br /&gt;
Condition '!(x &amp;lt; 0.0 != 0)' is not fulfilled.&lt;br /&gt;
at org.hanseltest.TestDoubleClass.comparisons&lt;br /&gt;
(TestDoubleClass.java:40)&lt;/p&gt;
&lt;p&gt;The reason is that the dcmpl and dcmpg instructions &lt;br /&gt;
work by themselves pushing 0, -1, or 1 on the stack, &lt;br /&gt;
which is then checked by an if, e.g.&lt;/p&gt;
&lt;p&gt;0 dload_1&lt;br /&gt;
1 dconst_0&lt;br /&gt;
2 dcmpl&lt;br /&gt;
3 ifne 17&lt;/p&gt;
&lt;p&gt;Here is a test which tests some more cases:&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;package org.hanseltest;&lt;/p&gt;
&lt;p&gt;import junit.framework.TestCase;&lt;br /&gt;
import junit.framework.Test;&lt;/p&gt;
&lt;p&gt;import org.hansel.CoverageDecorator;&lt;/p&gt;
&lt;p&gt;/**&lt;br /&gt;
* Strange conditions for double comparisons&lt;br /&gt;
* @author HMMueller&lt;br /&gt;
*/&lt;br /&gt;
public class TestDouble extends TestCase {&lt;br /&gt;
/**&lt;br /&gt;
* Create a new Test.&lt;br /&gt;
* @param name Name of the test.&lt;br /&gt;
*/&lt;br /&gt;
public TestDouble(String name) {&lt;br /&gt;
super(name);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;/** Cover the class. */&lt;br /&gt;
public void testSomething() {&lt;/p&gt;
&lt;p&gt;new TestDoubleClass().comparisons(3);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;/** &lt;br /&gt;
* Returns the coverage test suite. &lt;br /&gt;
* @return Test suite.&lt;br /&gt;
*/&lt;br /&gt;
public static Test suite() {&lt;br /&gt;
return new CoverageDecorator(TestDouble.class, &lt;br /&gt;
new Class[] { &lt;br /&gt;
TestDoubleClass.class });&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;class TestDoubleClass {&lt;br /&gt;
int comparisons(double x) {&lt;br /&gt;
double y = -x;&lt;br /&gt;
if (x == 0) {&lt;br /&gt;
return 15;&lt;br /&gt;
} else if (x &amp;lt; 0) {&lt;br /&gt;
return 16;&lt;br /&gt;
} else if (x &amp;lt;= 0) {&lt;br /&gt;
return 17;&lt;br /&gt;
} else if (x &amp;lt;= 2) {&lt;br /&gt;
return 18;&lt;br /&gt;
} else if (x &amp;lt;= -3) {&lt;br /&gt;
return 19;&lt;br /&gt;
} else if (x == -3) {&lt;br /&gt;
return 20;&lt;br /&gt;
} else if (y &amp;gt; 0) {&lt;br /&gt;
return 21;&lt;br /&gt;
} else if (y &amp;gt;= 0) {&lt;br /&gt;
return 22;&lt;br /&gt;
} else if (y &amp;gt;= -2) {&lt;br /&gt;
return 23;&lt;br /&gt;
} else {&lt;br /&gt;
return 99;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;
HMMueller&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Should work on suite level, not just single testcase level</title><link href="https://sourceforge.net/p/hansel/bugs/41/" rel="alternate"/><published>2003-11-15T21:47:55Z</published><updated>2003-11-15T21:47:55Z</updated><author><name>Chad Woolley</name><uri>https://sourceforge.net/u/thewoolleyman/</uri></author><id>https://sourceforge.net9caf5c85d073fb694b20ac42f2a18ffaa2569d15</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If I want to refactor my TestCases and test fixtures &lt;br /&gt;
(setUp()) so that multiple TestCases work together to &lt;br /&gt;
provide complete coverage, Hansel doesn't support this.&lt;/p&gt;
&lt;p&gt;Here is a post I made on the Test Driven Development &lt;br /&gt;
(http://groups.yahoo.com/group/testdrivendevelopment&lt;br /&gt;
/) newsgroup that discusses the problem:&lt;/p&gt;
&lt;p&gt;------------------------&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There's a little bit of intro to this question and problem:&lt;/p&gt;
&lt;p&gt;I've been reading Dave Astel's TDD book, and I find the &lt;br /&gt;
approach of test refactoring very interesting.  He &lt;br /&gt;
advocates (paraphrased from memory) that you split up &lt;br /&gt;
your TestCases so that your fixtures apply to ALL the &lt;br /&gt;
tests in the TestCase.  For example, TestList and &lt;br /&gt;
TestEmptyList, both with different setUp() methods for &lt;br /&gt;
the different fixtures.&lt;/p&gt;
&lt;p&gt;I've also been using Hansel &lt;br /&gt;
(http://sourceforge.net/projects/hansel), which is a &lt;br /&gt;
code coverage tool.  It ensures that a SINGLE given &lt;br /&gt;
TestCase executes every line and logic path in one or &lt;br /&gt;
more Classes Under Test.  I've found this tool very &lt;br /&gt;
useful in helping me to TDD and drive towards simple, &lt;br /&gt;
well-designed tests and classes.&lt;/p&gt;
&lt;p&gt;Here's the problem:&lt;/p&gt;
&lt;p&gt;These two approaches seem to be incompatible.  Hansel &lt;br /&gt;
only works on a single-testcase level, so if you split your &lt;br /&gt;
tests into two TestCase classes, they will both report &lt;br /&gt;
incomplete coverage, even though they may be working &lt;br /&gt;
together to provide complete coverage.&lt;/p&gt;
&lt;p&gt;I know that Hansel could probably be modified to check &lt;br /&gt;
for coverage at a suite level, and I could then define &lt;br /&gt;
suites that group the TestCases that work together to &lt;br /&gt;
provide complete coverage.  However, this probably &lt;br /&gt;
won't happen soon.&lt;/p&gt;
&lt;p&gt;Does anyone have a solution to this problem?  Does &lt;br /&gt;
anyone know of any FREE tools which provide the same &lt;br /&gt;
type of fine-grained, per-testcase coverage that Hansel &lt;br /&gt;
does, but also work at the suite level?  NoUnit might &lt;br /&gt;
work, but I couldn't get it to work right the first time I &lt;br /&gt;
tried.  Clover would probably be good too, but it's not &lt;br /&gt;
free.&lt;/p&gt;
&lt;p&gt;ALso, the problem with NoUnit, Clover, and other &lt;br /&gt;
project-level coverage tools is that they lack the &lt;br /&gt;
immediate unit-level feedback that Hansel gives you.  I &lt;br /&gt;
want to see immediately (after a single testcase run) &lt;br /&gt;
when I no longer have 100% coverage, not after &lt;br /&gt;
running the entire suite of tests.  Plus, Hansel &lt;br /&gt;
integrates with my Eclipse junit to take me right to the &lt;br /&gt;
offending line when I click the teset failure.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Chad&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Code seems to be uncoverable</title><link href="https://sourceforge.net/p/hansel/bugs/40/" rel="alternate"/><published>2003-07-26T12:52:50Z</published><updated>2003-07-26T12:52:50Z</updated><author><name>Corey Spink</name><uri>https://sourceforge.net/u/userid-787595/</uri></author><id>https://sourceforge.net26fc2dae5c7470ecfc76559c5e5c1e4f63c6514a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I get the following error message:&lt;/p&gt;
&lt;p&gt;org.hansel.Probe$CoverageError: Coverage failure:&lt;br /&gt;
Branch not completely covered. Expression '!pieceToMove&lt;br /&gt;
instanceof scamsoft.games.spazchess.piece.Pawn' is&lt;br /&gt;
never false.&lt;br /&gt;
Coverage failure: Branch not completely covered.&lt;br /&gt;
Expression '!pieceToMove instanceof&lt;br /&gt;
scamsoft.games.spazchess.piece.Pawn' is never false.&lt;br /&gt;
at&lt;br /&gt;
scamsoft.games.spazchess.Board.determineMoveValidity(Board.java:595)&lt;br /&gt;
at&lt;br /&gt;
scamsoft.games.spazchess.Board.determineMoveValidity(Board.java:595)&lt;/p&gt;
&lt;p&gt;But if I step through with a debugger, both options for&lt;br /&gt;
the branch in question are definitely executed.&lt;/p&gt;
&lt;p&gt;The fact that it only reports 1 line in its stack&lt;br /&gt;
trace, but reports it twice, is strange for a start.&lt;/p&gt;
&lt;p&gt;I have attached all the source code that should be&lt;br /&gt;
needed to compile and run the tests in&lt;br /&gt;
scamsoft.games.spazchess.test.SpazChessTestSuite.java.&lt;br /&gt;
It will need JUnit in the classpath. &lt;/p&gt;
&lt;p&gt;Let me know if this is enough information to track the&lt;br /&gt;
problem down. It's possible that the error is all mine&lt;br /&gt;
as it started occurring quite late at night, so the&lt;br /&gt;
relevant bits of code to look at are all in the package&lt;br /&gt;
scamsoft.games.spazchess. They are Board.java:line 593,&lt;br /&gt;
and test.BoardTest.java, test.SpazChessTestSuite.java&lt;br /&gt;
and piece.test.*.java (these are all involved in&lt;br /&gt;
exercising the Board class directly or indirectly). &lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;p&gt;P.S: Sorry the test code is such a copy-and-paste&lt;br /&gt;
nightmare. Now I look at it, I have no idea why I did&lt;br /&gt;
that, and it will be fixed soon, trust me! :-)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>&amp;quot;.class&amp;quot; causes coverage failure (e. g. &amp;quot;Integer.class&amp;quot;)</title><link href="https://sourceforge.net/p/hansel/bugs/39/" rel="alternate"/><published>2003-07-23T12:29:57Z</published><updated>2003-07-23T12:29:57Z</updated><author><name>Juergen Altfeld</name><uri>https://sourceforge.net/u/pizzapapa/</uri></author><id>https://sourceforge.netb01c238b25373f7816cb9ba379855a82a67a7744</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Similar to alreay reported bugs I get a coverage failure, &lt;br /&gt;
if I use the following code in any of my coverage test &lt;br /&gt;
classes (as attribute or within a method):&lt;/p&gt;
&lt;p&gt;...&lt;br /&gt;
Class c = Integer.class;&lt;br /&gt;
...&lt;/p&gt;
&lt;p&gt;I am using JBuilder 8 eval version with jdk 1.4.1 and&lt;br /&gt;
hansel 1.0 (released version from 06/15/2003).&lt;/p&gt;
&lt;p&gt;If I replace the code by calling a factory method of &lt;br /&gt;
another class that is not coverage tested, there is no &lt;br /&gt;
coverage failure reported by hansel:&lt;/p&gt;
&lt;p&gt;...&lt;br /&gt;
Class c = ClassFactory.getIntegerClass();&lt;br /&gt;
...&lt;/p&gt;
&lt;p&gt;Can anybody reproduce this problem?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>&amp;gt;= creates wrong expression text</title><link href="https://sourceforge.net/p/hansel/bugs/38/" rel="alternate"/><published>2003-06-21T07:05:23Z</published><updated>2003-06-21T07:05:23Z</updated><author><name>Harald M. Mueller</name><uri>https://sourceforge.net/u/hmmueller/</uri></author><id>https://sourceforge.net941824a94de05b1fcf597d1231b8496174b5cf06</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Testing the following&lt;/p&gt;
&lt;p&gt;public void cmp(int a, int b) &lt;br /&gt;
{&lt;br /&gt;
if (a &amp;amp;lt; b) &lt;br /&gt;
System.out.println(&amp;amp;quot;b &amp;amp;gt;= a is &amp;amp;quot; + (b &amp;amp;gt;= a));&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;p&gt;cmp(1, 2)&lt;/p&gt;
&lt;p&gt;yields the following output:&lt;/p&gt;
&lt;p&gt;-----------------&lt;br /&gt;
.b &amp;amp;gt;= a is true&lt;br /&gt;
....F.F&lt;br /&gt;
Time: 0,02&lt;br /&gt;
There were 2 failures:&lt;br /&gt;
1) Probe in &amp;amp;quot;TryHansel.java&amp;amp;quot; line 128[...] 'b &amp;amp;gt;= a' is &lt;br /&gt;
never true.&lt;br /&gt;
at TryHansel.cmp(TryHansel.java:128)&lt;br /&gt;
2) Probe in &amp;amp;quot;TryHansel.java&amp;amp;quot; line 129[...] 'a &amp;amp;lt; b' is never &lt;br /&gt;
true.&lt;br /&gt;
at TryHansel.cmp(TryHansel.java:129)&lt;/p&gt;
&lt;p&gt;FAILURES!!!&lt;br /&gt;
Tests run: 6,  Failures: 2,  Errors: 0&lt;br /&gt;
-----------------&lt;/p&gt;
&lt;p&gt;The important lines are the first and fifth:&lt;/p&gt;
&lt;p&gt;.b &amp;amp;gt;= a is true&lt;br /&gt;
[...]&lt;br /&gt;
1) [...] 'b &amp;amp;gt;= a' is never true.&lt;/p&gt;
&lt;p&gt;which is a contradiction. It seems that the expression &lt;br /&gt;
creation for &amp;amp;gt;= (and also &amp;amp;gt;, &amp;amp;lt;=, &amp;amp;lt; ??) swaps the left &lt;br /&gt;
and right side. The output&lt;/p&gt;
&lt;p&gt;1) ... 'a &amp;amp;gt;= b' is never true.&lt;/p&gt;
&lt;p&gt;would be correct. &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>