 <p>You have to define a JUnit task in your ant script. </p> <pre><code> &lt;junit&gt; &lt;test name="my.test.TestCase"/&gt; &lt;/junit&gt; </code></pre> <p>See <a href="http://ant.apache.org/manual/Tasks/junit.html" rel="nofollow">JUnit Task</a> for documentation.</p>