I am trying to add an Ant script to my company\'s project to run the jUnit tests. Here is what I have:
Found the answer. Needed to add a formatter.
<target name="unit-tests">
<junit>
<classpath>
<pathelement location="${project.libext.dir}/junit-4.1.jar"/>
</classpath>
<formatter type="plain" usefile="false" />
<batchtest>
<fileset dir="${project.src-test.dir}/my/company/." />
</batchtest>
</junit>
</target>
You can't print the full stack trace from the tests in the Ant output AFAIK; it's embedded in the JUnit report file. You can either browse that separately, or if you're using a continuous integration server such as Jenkins or CruiseControl to run your builds, you can set up a plugin that will link to the test reports.