Menu

#43 Failed to invoke suite(): java.lang.NoSuchMethodError: junit

v1.0
open
nobody
None
5
2004-09-22
2004-09-22
Anonymous
No

Hi,

I have downloaded Hansel 1.0 and we are using JDK1.4.
I have created a class Example(which is to be tested)
and a TestCase class ExampleTest.

In the suite() method of the TestCase class I have
included the code for initializing the Hansel code
coverage class as follows:
public static Test suite() {

CoverageDecorator cd = new CoverageDecorator
(new Class[] { Example.class });

cd.addTestClass(ExampleTest.class);

cd.setDisplayStatistics(true);

return cd;

}

The exception that I get while running the ExampleTest
class as a JUnit class using WSAD is as follows:

Failed to invoke suite(): java.lang.NoSuchMethodError:
junit.framework.TestSuite: method <init>
(Ljava/lang/Class;Ljava/lang/String;)V not found

How can this problem be resolved?

Thanks and Regards,
Ranjana

Discussion


Log in to post a comment.

MongoDB Logo MongoDB