next up previous contents index
Next: Parameters Up: Optional Tasks Previous: JUnit   Contents   Index

Description

This task runs tests from the JUnit testing framework. The latest version of the framework can be found at http://www.junit.org. This task has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't work with versions prior to JUnit 3.0.

Note: This task depends on external libraries not included in the Ant distribution. See Library Dependencies for more information.

Note: You must have junit.jar and the class files for the <junit> task in the same classpath. You can do one of:

  1. Put both junit.jar and the optional tasks jar file in ANT_HOME/lib.
  2. Do not put either in ANT_HOME/lib, and instead include their locations in your CLASSPATH environment variable.
  3. Do neither of the above, and instead, specify their locations using a <classpath> element in the build file. See the FAQ for details.

Tests are defined by nested test or batchtest tags (see nested elements).



Subsections

Andrew Marlow 2003-07-08