How can I get JUnit test (driven from Ant script) to dump the stack of exception that causes failure

Posted by Matt Wang on Stack Overflow See other posts from Stack Overflow or by Matt Wang
Published on 2010-03-19T19:48:23Z Indexed on 2010/03/19 19:51 UTC
Read the original article Hit count: 124

Filed under:
|
|
|
|

We run JUnit test from Ant script, as follows. When the test failed, I expect it to output the stack dump of the exception that casuses the failure, but it doesn't. Is there any trick to get it dumped?

<target description="Run JUnit tests" name="run-junit" depends="build-junit">
    <copy file="./AegisLicense.txt" tofile="test/junit/classes/AegisLicense.txt" overwrite="true"/>
    <junit printsummary="yes" haltonfailure="no" fork="yes" forkmode="once" failureproperty="run-aegis-junit-failed" showoutput="yes" filtertrace="off">
        <classpath refid="Aegisoft.testsupport.classpath"/>
        <classpath>
            <pathelement location="test/junit/classes"/>
        </classpath>
        <batchtest>
            <fileset dir="test/junit/src">
                <include name="**"/>
            </fileset>
        </batchtest>
    </junit>
 <fail

© Stack Overflow or respective owner

Related posts about ant

Related posts about junit4