Class XMLAntUnitListener

java.lang.Object
org.apache.ant.antunit.listener.BaseAntUnitListener
org.apache.ant.antunit.listener.XMLAntUnitListener
All Implemented Interfaces:
AntUnitListener

public class XMLAntUnitListener extends BaseAntUnitListener
A test listener for <antunit> modelled after the XML JUnit test listener that is part of Ant.
  • Constructor Details

    • XMLAntUnitListener

      public XMLAntUnitListener()
  • Method Details

    • startTestSuite

      public void startTestSuite(org.apache.tools.ant.Project testProject, String buildFile)
      Description copied from interface: AntUnitListener
      Invoked once per build file, before any targets get executed.
      Specified by:
      startTestSuite in interface AntUnitListener
      Overrides:
      startTestSuite in class BaseAntUnitListener
      Parameters:
      testProject - the project
      buildFile - the build file
    • endTestSuite

      public void endTestSuite(org.apache.tools.ant.Project testProject, String buildFile)
      Description copied from interface: AntUnitListener
      Invoked once per build file, after all targets have been executed.
      Parameters:
      testProject - the project
      buildFile - the build file
    • startTest

      public void startTest(String target)
      Description copied from interface: AntUnitListener
      Invoked before a test target gets executed.
      Specified by:
      startTest in interface AntUnitListener
      Overrides:
      startTest in class BaseAntUnitListener
      Parameters:
      target - name of the target
    • endTest

      public void endTest(String target)
      Description copied from interface: AntUnitListener
      Invoked after a test target has been executed.
      Parameters:
      target - name of the target
    • addFailure

      public void addFailure(String target, AssertionFailedException ae)
      Description copied from interface: AntUnitListener
      Invoked if an assert tasked caused an error during execution.
      Specified by:
      addFailure in interface AntUnitListener
      Overrides:
      addFailure in class BaseAntUnitListener
      Parameters:
      target - name of the target
      ae - the failure
    • addError

      public void addError(String target, Throwable ae)
      Description copied from interface: AntUnitListener
      Invoked if any error other than a failed assertion occured during execution.
      Specified by:
      addError in interface AntUnitListener
      Overrides:
      addError in class BaseAntUnitListener
      Parameters:
      target - name of the target
      ae - the error
    • messageLogged

      protected void messageLogged(org.apache.tools.ant.BuildEvent event)
      Description copied from class: BaseAntUnitListener
      Gets messages from the project running the test target if their level is at least of the level specified with setLogLevel.

      This implementation is empty.

      Overrides:
      messageLogged in class BaseAntUnitListener
      Parameters:
      event - the logged message