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


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



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 
JUnit version 4.8.1

Time: 0

OK (0 tests)

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

Back to FAQ for JUnit (Java Unit) Testing.

2016-03-02, 1821👍, 0💬