I have a number of tests failing in the following JUnit Task.
<target name="test-main" depends="build.modules" description="Main Integration/Unit tests">
<junit fork="yes"
description="Main Integration/Unit Tests"
showoutput="true"
printsummary="true"
outputtoformatters="true">
<classpath refid="test-main.runtime.classpath"/>
<batchtest filtertrace="false" todir="${basedir}">
<fileset dir="${basedir}" includes="**/*Test.class" excludes="**/*MapSimulationTest.class"/>
</batchtest>
</junit>
</target>
How do I tell Junit to ouput the errors for each test so that I can look at the stack trace and debug the issues.
You'll need to add the formatter task as a child of the batchtest task (NOT as the immediate child of the junit task)
The syntax of formatter is:
<formatter type="plain" usefile="false"/>
type
can be one of plain
, brief
, xml
or failure
.
usefile="false"
asks Ant to send output to the console.
Scroll down to the h4 on "formatters" at http://ant.apache.org/manual/Tasks/junit.html for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With