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

# Klasse AntUnitScriptRunner

java.lang.Object
org.apache.ant.antunit.AntUnitScriptRunner

public class AntUnitScriptRunner extends Object
Run antunit tests suites. This AntUnitScriptRunner is responsible for the management of the ant project and the correct invocation the target (taking into account properly the [case]setUp and [case]tearDown targets). The user can however provide the order of the test targets and or can filter the list of test targets to execute. The user must also provide its ProjectFactory and an AntUnitExecutionNotifier.

Seit:
  1.2

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `AntUnitScriptRunner(ProjectFactory prjFactory)`
  Create a new AntScriptRunner on the given environment.

- ## Methodenübersicht

  Modifikator und Typ
  Methode
  Beschreibung
  `final org.apache.tools.ant.Project`
  `getCurrentProject()`
  Get the project currently in use.
  `String`
  `getName()`
  Provides the name of the active script.
  `List<String>`
  `getTestTargets()`
  Get the (names of the) test targets to execute.
  `List<String>`
  `getTestTartgets()`
  Veraltet.
  `void`
  `runSuite(List<String> suiteTargets, AntUnitExecutionNotifier notifier)`
  Executes the suite.

  ### Von Klasse geerbte Methoden Object

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

- ## Konstruktordetails

  - ### AntUnitScriptRunner

    public AntUnitScriptRunner(ProjectFactory prjFactory) throws org.apache.tools.ant.BuildException
    Create a new AntScriptRunner on the given environment.
    Parameter:
      `prjFactory` - A factory for the ant project that will contains the antunit test to execute. The factory might be invoked multiple time in order to provide test isolation.
    Löst aus:
      `org.apache.tools.ant.BuildException` - The project can not be parsed

- ## Methodendetails

  - ### getCurrentProject

    public final org.apache.tools.ant.Project getCurrentProject() throws org.apache.tools.ant.BuildException
    Get the project currently in use. The caller is not allowed to invoke a target or do anything that would break the isolation of the test targets.
    Gibt zurück:
      the current project
    Löst aus:
      `org.apache.tools.ant.BuildException` - The project can not be parsed

  - ### getTestTartgets

    @Deprecated public List<String> getTestTartgets()
    Veraltet.
    Gibt zurück:
      List<String> List of test targets of the script file

  - ### getTestTargets

    public List<String> getTestTargets()
    Get the (names of the) test targets to execute.
    Gibt zurück:
      `List` of `String`

  - ### getName

    public String getName()
    Provides the name of the active script.
    Gibt zurück:
      name of the project

  - ### runSuite

    public void runSuite(List<String> suiteTargets, AntUnitExecutionNotifier notifier)
    Executes the suite.
    Parameter:
      `suiteTargets` - An ordered list of test targets. It must be a sublist of getTestTargets
      `notifier` - is notified on test progress