FailureAntUnitListener (ant-antunit API)
Description: declaration: package: org.apache.ant.antunit.listener, class: FailureAntUnitListener

# Klasse FailureAntUnitListener

java.lang.Object
org.apache.ant.antunit.listener.BaseAntUnitListener
org.apache.ant.antunit.listener.FailureAntUnitListener

Alle implementierten Schnittstellen:
  `AntUnitListener`

public class FailureAntUnitListener extends BaseAntUnitListener
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.

- ## Verschachtelte Klassen - Übersicht

  Verschachtelte Klassen
  Modifikator und Typ
  Klasse
  Beschreibung
  `class`
  `FailureAntUnitListener.TestInfos`
  Class for collecting needed information about failed tests.

  ### Von Klasse geerbte verschachtelte Klassen/Schnittstellen BaseAntUnitListener

  `BaseAntUnitListener.AntUnitLogLevel, BaseAntUnitListener.LogGrabber, BaseAntUnitListener.SendLogTo`

- ## Feldübersicht

  ### Von Klasse geerbte Felder BaseAntUnitListener

  `errorCount, failureCount, nf, runCount, start, testStart`

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `FailureAntUnitListener()`
  No-arg constructor.

- ## Methodenübersicht

  Modifikator und Typ
  Methode
  Beschreibung
  `void`
  `addError(String target, Throwable ae)`
  Invoked if any error other than a failed assertion occured during execution.
  `void`
  `addFailure(String target, AssertionFailedException ae)`
  Invoked if an assert tasked caused an error during execution.
  `void`
  `endTest(String target)`
  not in use
  `void`
  `endTestSuite(org.apache.tools.ant.Project testProject, String buildFile)`
  Invoked once per build file, after all targets have been executed.
  `void`
  `setFile(File file)`
  `void`
  `startTestSuite(org.apache.tools.ant.Project testProject, String buildFile)`
  Invoked once per build file, before any targets get executed.

  ### Von Klasse geerbte Methoden BaseAntUnitListener

  `close, getCurrentTestProject, getLocation, getOut, getToDir, messageLogged, normalize, setCurrentTestProject, setLogLevel, setParentTask, setSendLogTo, setToDir, startTest`

  ### Von Klasse geerbte Methoden Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Konstruktordetails

  - ### FailureAntUnitListener

    public FailureAntUnitListener()
    No-arg constructor.

- ## Methodendetails

  - ### setFile

    public void setFile(File file)

  - ### startTestSuite

    public void startTestSuite(org.apache.tools.ant.Project testProject, String buildFile)
    Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
    Invoked once per build file, before any targets get executed.
    Angegeben von:
      `startTestSuite` in Schnittstelle `AntUnitListener`
    Setzt außer Kraft:
      `startTestSuite` in Klasse `BaseAntUnitListener`
    Parameter:
      `testProject` - the project
      `buildFile` - the build file

  - ### addError

    public void addError(String target, Throwable ae)
    Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
    Invoked if any error other than a failed assertion occured during execution.
    Angegeben von:
      `addError` in Schnittstelle `AntUnitListener`
    Setzt außer Kraft:
      `addError` in Klasse `BaseAntUnitListener`
    Parameter:
      `target` - name of the target
      `ae` - the error

  - ### addFailure

    public void addFailure(String target, AssertionFailedException ae)
    Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
    Invoked if an assert tasked caused an error during execution.
    Angegeben von:
      `addFailure` in Schnittstelle `AntUnitListener`
    Setzt außer Kraft:
      `addFailure` in Klasse `BaseAntUnitListener`
    Parameter:
      `target` - name of the target
      `ae` - the failure

  - ### endTest

    public void endTest(String target)
    not in use
    Parameter:
      `target` - name of the target

  - ### endTestSuite

    public void endTestSuite(org.apache.tools.ant.Project testProject, String buildFile)
    Beschreibung aus Schnittstelle kopiert: `AntUnitListener`
    Invoked once per build file, after all targets have been executed.
    Parameter:
      `testProject` - the project
      `buildFile` - the build file