Class TearDownOnVmCrash
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.optional.junit.TearDownOnVmCrash
 
- 
- All Implemented Interfaces:
- junit.framework.TestListener,- JUnitResultFormatter,- JUnitTaskMirror.JUnitResultFormatterMirror
 
 public class TearDownOnVmCrash extends java.lang.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
 
- 
- 
Constructor SummaryConstructors Constructor Description TearDownOnVmCrash()
 - 
Method SummaryModifier and Type Method Description voidaddError(junit.framework.Test fakeTest, java.lang.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(junit.framework.Test test, java.lang.Throwable t)voidaddFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)voidendTest(junit.framework.Test test)voidendTestSuite(JUnitTest suite)The whole testsuite ended.voidsetOutput(java.io.OutputStream out)Sets the stream the formatter is supposed to write its results to.voidsetSystemError(java.lang.String err)This is what the test has written to System.errvoidsetSystemOutput(java.lang.String out)This is what the test has written to System.outvoidstartTest(junit.framework.Test test)voidstartTestSuite(JUnitTest suite)Records the suite's name to later determine the class to invoke tearDown on.
 
- 
- 
- 
Method Detail- 
startTestSuitepublic void startTestSuite(JUnitTest suite) Records the suite's name to later determine the class to invoke tearDown on.- Specified by:
- startTestSuitein interface- JUnitResultFormatter
- Parameters:
- suite- the suite.
 
 - 
addErrorpublic void addError(junit.framework.Test fakeTest, java.lang.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.- Specified by:
- addErrorin interface- junit.framework.TestListener
 
 - 
addFailurepublic void addFailure(junit.framework.Test test, java.lang.Throwable t)
 - 
addFailurepublic void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)- Specified by:
- addFailurein interface- junit.framework.TestListener
 
 - 
startTestpublic void startTest(junit.framework.Test test) - Specified by:
- startTestin interface- junit.framework.TestListener
 
 - 
endTestpublic void endTest(junit.framework.Test test) - Specified by:
- endTestin interface- junit.framework.TestListener
 
 - 
endTestSuitepublic void endTestSuite(JUnitTest suite) Description copied from interface:JUnitResultFormatterThe whole testsuite ended.- Specified by:
- endTestSuitein interface- JUnitResultFormatter
- Parameters:
- suite- the suite.
 
 - 
setOutputpublic void setOutput(java.io.OutputStream out) Description copied from interface:JUnitResultFormatterSets the stream the formatter is supposed to write its results to.- Specified by:
- setOutputin interface- JUnitResultFormatter
- Specified by:
- setOutputin interface- JUnitTaskMirror.JUnitResultFormatterMirror
- Parameters:
- out- the output stream to use.
 
 - 
setSystemOutputpublic void setSystemOutput(java.lang.String out) Description copied from interface:JUnitResultFormatterThis is what the test has written to System.out- Specified by:
- setSystemOutputin interface- JUnitResultFormatter
- Parameters:
- out- the string to write.
 
 - 
setSystemErrorpublic void setSystemError(java.lang.String err) Description copied from interface:JUnitResultFormatterThis is what the test has written to System.err- Specified by:
- setSystemErrorin interface- JUnitResultFormatter
- Parameters:
- err- the string to write.
 
 
- 
 
-