org.apache.tools.ant.taskdefs.optional.junit

Class TearDownOnVmCrash

public class TearDownOnVmCrash extends Object implements JUnitResultFormatter

Formatter that doesn't create any output but tries to invoke the tearDown method on a testcase if that test was forked and caused a timeout or VM crash.

This formatter has some limitations, for details see the <junit> task's manual.

Since: Ant 1.8.0

Method Summary
voidaddError(Test fakeTest, Throwable t)
Only invoke tearDown if the suite is known and not the dummy test we get when a Batch fails and the error is an actual error generated by Ant.
voidaddFailure(Test test, Throwable t)
voidaddFailure(Test test, AssertionFailedError t)
voidendTest(Test test)
voidendTestSuite(JUnitTest suite)
voidsetOutput(OutputStream out)
voidsetSystemError(String err)
voidsetSystemOutput(String out)
voidstartTest(Test test)
voidstartTestSuite(JUnitTest suite)
Records the suite's name to later determine the class to invoke tearDown on.

Method Detail

addError

public void addError(Test fakeTest, Throwable t)
Only invoke tearDown if the suite is known and not the dummy test we get when a Batch fails and the error is an actual error generated by Ant.

addFailure

public void addFailure(Test test, Throwable t)

addFailure

public void addFailure(Test test, AssertionFailedError t)

endTest

public void endTest(Test test)

endTestSuite

public void endTestSuite(JUnitTest suite)

setOutput

public void setOutput(OutputStream out)

setSystemError

public void setSystemError(String err)

setSystemOutput

public void setSystemOutput(String out)

startTest

public void startTest(Test test)

startTestSuite

public void startTestSuite(JUnitTest suite)
Records the suite's name to later determine the class to invoke tearDown on.