Comment faire pour exécuter les cas de test dans JUnit en ligne de commande ?

Je suis en train de lancer un cas de test JUnit en ligne de commande à l'aide de cette commande:

F:\>java org.junit.runner.JUnitCore org.junit4.9b2.junit.SimpleTest

mais j'obtiens cette erreur:

Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/runner/JUnitCore

Caused by: java.lang.ClassNotFoundException: org.junit.runner.JUnitCore
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.junit.runner.JUnitCore.  Program will exit.

Quel est le problème?

OriginalL'auteur Adham | 2011-03-02