Dirk,
I'm assuming your PATH variable is already properly set such that you can run
java.
I prefer using the Swing version of TestRunner because then I can just keep JUnit up and keep editing and recompiling classes. Each time I hit the Run button in JUnit it uses the newly compiled versions of the classes. Same thing goes if you use a batch file.
If you want to use a batch file, this is the command you need:
java junit.swingui.TestRunner -cp .;($JUNIT)\junit.jar
TestClass where
($JUNIT) is the path to junit.jar and
TestClass is the fully qualified name of the TestCase you want to run. You can substitute this with a command line parameter too if you want.
I'm using TextPad and setting it up is easy. I just add a new Tool Macro and configure it like so:
Command: ($JAVA)\bin\java.exe
Parameters: junit.swingui.TestRunner -cp .;d:\junit\junit.jar $Sel.$BaseName
Initial Folder: $FileDir
Where ($JAVA) would be the path to bin\java.exe. The $Sel macro parameter allows me to simply highlight the package name of the TestCase before running the Tool macro.
HTH,
Junilu
[ March 11, 2002: Message edited by: Junilu Lacar ]