Class FailureAntUnitListener
java.lang.Object
org.apache.ant.antunit.listener.BaseAntUnitListener
org.apache.ant.antunit.listener.FailureAntUnitListener
- All Implemented Interfaces:
AntUnitListener
This AntUnitListener creates a new buildfile with a target for each
failed test target in the AntUnit run. The generated target calls
the failed target (with setUp and tearDown if present in the called
project).
This is intended for rerunning just failed tests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassClass for collecting needed information about failed tests.Nested classes/interfaces inherited from class BaseAntUnitListener
BaseAntUnitListener.AntUnitLogLevel, BaseAntUnitListener.LogGrabber, BaseAntUnitListener.SendLogTo -
Field Summary
Fields inherited from class BaseAntUnitListener
errorCount, failureCount, nf, runCount, start, testStart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked if any error other than a failed assertion occured during execution.voidaddFailure(String target, AssertionFailedException ae) Invoked if an assert tasked caused an error during execution.voidnot in usevoidendTestSuite(org.apache.tools.ant.Project testProject, String buildFile) Invoked once per build file, after all targets have been executed.voidvoidstartTestSuite(org.apache.tools.ant.Project testProject, String buildFile) Invoked once per build file, before any targets get executed.Methods inherited from class BaseAntUnitListener
close, getCurrentTestProject, getLocation, getOut, getToDir, messageLogged, normalize, setCurrentTestProject, setLogLevel, setParentTask, setSendLogTo, setToDir, startTest
-
Constructor Details
-
FailureAntUnitListener
public FailureAntUnitListener()No-arg constructor.
-
-
Method Details
-
setFile
-
startTestSuite
Description copied from interface:AntUnitListenerInvoked once per build file, before any targets get executed.- Specified by:
startTestSuitein interfaceAntUnitListener- Overrides:
startTestSuitein classBaseAntUnitListener- Parameters:
testProject- the projectbuildFile- the build file
-
addError
Description copied from interface:AntUnitListenerInvoked if any error other than a failed assertion occured during execution.- Specified by:
addErrorin interfaceAntUnitListener- Overrides:
addErrorin classBaseAntUnitListener- Parameters:
target- name of the targetae- the error
-
addFailure
Description copied from interface:AntUnitListenerInvoked if an assert tasked caused an error during execution.- Specified by:
addFailurein interfaceAntUnitListener- Overrides:
addFailurein classBaseAntUnitListener- Parameters:
target- name of the targetae- the failure
-
endTest
-
endTestSuite
Description copied from interface:AntUnitListenerInvoked once per build file, after all targets have been executed.- Parameters:
testProject- the projectbuildFile- the build file
-