Audience
Developers and individuals looking for a test framework for their Apache Ant tasks and types
About Apache AntUnit
Initially all tests for Apache Ant tasks were written as individual JUnit test cases. Pretty soon it was clear that most tests needed to perform common tasks like reading a build file, initializing a project instance with it and executing a target. At this point BuildFileTest was invented, a base class for almost all task test cases. BuildFileTest works fine and in fact has been picked up by the Ant-Contrib Project and others as well. This approach has a couple of advantages, one of them is that it is very easy to translate an example build file from a bug report into a test case. If you ask a user for a testcase for a given bug in Ant, he now doesn't need to understand JUnit or how to fit a test into Ant's existing tests any more. AntUnit takes this approach to testing even further, it removes JUnit completely and it comes with a set of predefined <assert> tasks in order to reuse common kind of checks.