Well, I, like others, are new to jUnit and have a hard time trying to get it to work. I searched the forum, but the answers are provided; I just do not understand. If anyone there could lend me a hand, I would really appreciate it.
Let me outline the basics: OS: Mac OS X.6
export JUNIT_HOME="/Developer/junit/junit4.8.1" export CVSROOT="/opt/cvsroot" export PATH="/usr/local/bin:/usr/local/sbin:/usr/localmysql/bin:/opt/PalmSDK/Current/bin/:/usr/local/mysql/bin:$PATH:$JUNIT_HOME:$CVSROOT" export CLASSPATH="$CLASSPATH:$JUNIT_HOME/junit-4.8.1.jar:$JUNIT_HOME"
I can compile a test class from a java file, however, when I try to run a test
java org.junit.runner.JUnitCore MyTest.class
I get the following:
JUnit version 4.8.1 Could not find class: MyTest.class Time: 0.001 OK (0 tests)
Now I was in the directory with MyTest.class , which is located somewhere in my file system, I tried to move the source folder to the junit folder and the junit/junit4.8.1 and the same result. I can't even run the tests that came with junit.
source share