Class Suite

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
ise.antelope.tasks.Suite
All Implemented Interfaces:
Cloneable, org.apache.tools.ant.TaskContainer

public class Suite extends org.apache.tools.ant.Task implements org.apache.tools.ant.TaskContainer
Modeled after the TestSuite provided by jUnit.
  • Field Summary

    Fields inherited from class org.apache.tools.ant.Task

    target, taskName, taskType, wrapper

    Fields inherited from class org.apache.tools.ant.ProjectComponent

    description, location, project
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFileset(org.apache.tools.ant.types.FileSet fs)
    Add a fileset to the suite.
    void
    Add a stuie to the suite.
    void
    addTask(org.apache.tools.ant.Task task)
    Add a task to execute, most likely a testcase, but really can be any task.
    void
    Add a testcase to the suite.
    void
    Run tests.
    int
     
    boolean
     
     
     
    int
     
    int
     
     
    int
     
    int
     
    void
     
    protected void
    loadTestFiles(org.apache.tools.ant.types.FileSet fs, Vector destination)
    Create TestCases from the files specified in a FileSet.
    void
    setAssertsenabled(boolean b)
    Should asserts be enabled? Asserts are enabled by default.
    void
    setEnabled(boolean b)
    Set to true if the test should be allowed to run.
    void
    setFailonerror(boolean f)
     
    void
    Set a name for the suite, optional attribute.
    void
    setShowsummary(boolean b)
    Should the results be shown?

    Methods inherited from class org.apache.tools.ant.Task

    bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Suite

      public Suite()
  • Method Details

    • init

      public void init()
      Overrides:
      init in class org.apache.tools.ant.Task
    • addTestCase

      public void addTestCase(TestCase tc)
      Add a testcase to the suite.
      Parameters:
      tc - the testcase to add
    • addSuite

      public void addSuite(Suite s)
      Add a stuie to the suite.
      Parameters:
      s - the suite to add
    • addTask

      public void addTask(org.apache.tools.ant.Task task)
      Add a task to execute, most likely a testcase, but really can be any task.

      Specified by:
      addTask in interface org.apache.tools.ant.TaskContainer
      Parameters:
      task - Nested task to execute.

    • addFileset

      public void addFileset(org.apache.tools.ant.types.FileSet fs)
      Add a fileset to the suite. For each file in the fileset, a testcase will be created.
    • setName

      public void setName(String s)
      Set a name for the suite, optional attribute.
      Parameters:
      s - the name for the suite.
    • getName

      public String getName()
      Returns:
      the name of the suite, may be null.
    • setFailonerror

      public void setFailonerror(boolean f)
    • getFailonerror

      public boolean getFailonerror()
    • setEnabled

      public void setEnabled(boolean b)
      Set to true if the test should be allowed to run.
      Parameters:
      b - if true, execute the test. This is handy for enabling or disabling groups of tests by setting a single property. Optional, default is true, the suite should run.
    • setAssertsenabled

      public void setAssertsenabled(boolean b)
      Should asserts be enabled? Asserts are enabled by default.
      Parameters:
      b - if false, disable asserts
    • setShowsummary

      public void setShowsummary(boolean b)
      Should the results be shown?
      Parameters:
      b - show the results if true
    • getTestCaseCount

      public int getTestCaseCount()
    • getRanCount

      public int getRanCount()
    • getPassedCount

      public int getPassedCount()
    • getFailedCount

      public int getFailedCount()
    • getFailures

      public Enumeration getFailures()
      Returns:
      an Enumeration of the failures. Individual elements are Strings containing the name of the failed target and the reason why it failed.
    • getWarningCount

      public int getWarningCount()
    • execute

      public void execute()
      Run tests.
      Overrides:
      execute in class org.apache.tools.ant.Task
    • getSummary

      public String getSummary()
    • loadTestFiles

      protected void loadTestFiles(org.apache.tools.ant.types.FileSet fs, Vector destination)
      Create TestCases from the files specified in a FileSet.
      Parameters:
      fs - the fileset to use for testcases
      destination - where to store the newly created TestCases.