Follow the given steps:
.........................................
.........................................
.......
Time: 0.453
OK (130 tests)
else try running the command line version
C:\junit4.8.1>java -classpath "C:\junit4.8.1\junit-4.8.1.jar;c:\junit4.8.1" junit.textui.TestRunner junit.samples.AllTests
Output should be like below
.........................................
.........................................
.........................................
.......
Time: 0.422
OK (130 tests)
if this does not work that means you may be using wrong java version. (I have tested junit 4.8.1 working with JDK 5)
- Mihir Patel.
- Download the Junit from the sourceforge repository.(Download Link) , the Zip file
- extract the zip file to a directory. ex c:\
- it should look like c:\junit4.8.1\ with folders ex. doc, javadoc etc
- Add the paths
- JUNIT_HOME=c:\junit4.8.1
- CLASSPATH=c:\junit4.8.1\junit-4.8.1.jar;c:\junit4.8.1
- JUNIT_HOME=c:\junit4.8.1
- open a new command window
- go to the C:\junit4.8.1 folder
- try following java junit.textui.TestRunner junit.samples.AllTests
.........................................
.........................................
.......
Time: 0.453
OK (130 tests)
else try running the command line version
C:\junit4.8.1>java -classpath "C:\junit4.8.1\junit-4.8.1.jar;c:\junit4.8.1" junit.textui.TestRunner junit.samples.AllTests
Output should be like below
.........................................
.........................................
.........................................
.......
Time: 0.422
OK (130 tests)
if this does not work that means you may be using wrong java version. (I have tested junit 4.8.1 working with JDK 5)
- Mihir Patel.
3 comments:
Thanks yaar....it helped me a lot during my internship period.
--Bhavesh Furia
Thank you. It was really helpful!
very good - glad i found this - looks like the Test.Runner and AllTest need different classpath
Post a Comment