Run org.junit.runner.JUnitCore in junit-4.8.1.jar

Q

How to run org.junit.runner.JUnitCore in junit-4.8.1.jar?

✍: FYIcenter.com

A

org.junit.runner.JUnitCore is the main class of the JUnit 4.8.1, which requires no other libraries.

You can run org.junit.runner.JUnitCore directly:

\fyicenter>java -version
java version "1.8.0_45"

\fyicenter>java -cp .;\local\lib\junit-4.8.1.jar 
   org.junit.runner.JUnitCore
JUnit version 4.8.1

Time: 0

OK (0 tests)

The output shows that 0 tests performed, because no test class is given.

 

Run Sample Program for junit-4.8.1.jar

Sample Program for junit-4.8.1.jar

Download and Install JUnit (Java Unit) Testing

⇑⇑ FAQ for JUnit (Java Unit) Testing

2016-03-02, 2158🔥, 0💬