Technology weblog

IT-Essence
Thursday May 24, 2007

Running JUnit from the command line

If you want or have to run your JUnit unit tests from the command line, invoke:

$ java junit.textui.TestRunner com.mycompany.mypackage.ClassToTest
I actually used this to find out why one of our unit tests failed on the integration server that builds our project using Maven and Continuum. Of course, at the command line you then also need the runtime classpath used by Maven.

Comments:

Post a Comment:
Comments are closed for this entry.

Hire us
Archives
Tags
Links
Stats
Referrers