-
Notifications
You must be signed in to change notification settings - Fork 37
jUnit Testing on the Command Line
Terry Norbraten edited this page Aug 28, 2025
·
10 revisions
First run:
ant compile.test
Then, to run a single test class (replace com.articulate.sigma.UnitTestSuite with the test of your choice)
java -Xmx10g -Xss1m \
-cp $SIGMA_CP:$SIGMA_SRC/build/test/classes \
org.junit.runner.JUnitCore \
com.articulate.sigma.UnitTestSuite
one test method at a time can be run with help from the SingleJUnitTestRunner class, for example
java -Xmx10g -Xss1m \
-cp $SIGMA_CP:$SIGMA_SRC/build/test/classes \
com.articulate.sigma.SingleJUnitTestRunner \
com.articulate.sigma.KbIntegrationTest#testIsChildOf3
You will have to edit the resource files test/unit/java/resources/config*.xml to conform to your paths.
An alternative, and possibly easier way for command line invocation of unit tests are to run these Ant tasks:
ant test.unit
ant test.integration
To run both of these in sequence with a single command
ant test