Running JUnit with samples cannot find class!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Raymond_Hoffmann
Posted On:   Monday, May 10, 2004 06:52 AM

Hi, I've just recently installed JUnit, and am attempting to learn how to make it run. In the FAQ it says to set the CLASSPATH by using: "set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%junit.jar", which is what I did (on Windows with JUnit 3.8.1). When I attempt to run the examples as the FAQ says: "java junit.swingui.TestRunner junit.samples.AllTests", I get the GUI appearing, but I always get the message at the bottom of the GUI in the message area: 'Class not found "junit.samples.AllTests"'. How can I get this to work? I ran the test from the %JUNIT_HOME% directory. Also, when I click on the '...' button beside the Test class name combo, I get the following   More>>

Hi,


I've just recently installed JUnit, and am attempting to learn how to make it run. In the FAQ it says to set the CLASSPATH by using: "set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%junit.jar", which is what I did (on Windows with JUnit 3.8.1).


When I attempt to run the examples as the FAQ says: "java junit.swingui.TestRunner junit.samples.AllTests", I get the GUI appearing, but I always get the message at the bottom of the GUI in the message area: 'Class not found "junit.samples.AllTests"'. How can I get this to work?


I ran the test from the %JUNIT_HOME% directory.


Also, when I click on the '...' button beside the Test class name combo, I get the following error: "No Test Cases found. Check that the configured 'TestCollector' is supported on this platform." I couldn't find any informtion about a 'TestCollector' in the FAQ. What is it? How do I set/use it?


Thanks.


RmH.

   <<Less

Re: Running JUnit with samples cannot find class!

Posted By:   Sean_Owen  
Posted On:   Monday, May 10, 2004 08:04 AM

Looks like the classes from junit.samples are not in the junit.jar file. However they are included in the JUnit distribution. If you add %JUNIT_HOME% to your classpath as well then this should work -- "set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%junit.jar;%JUNIT_HOME%".
About | Sitemap | Contact