Package ise.antelope.tasks
Class Suite
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- ise.antelope.tasks.Suite
-
- All Implemented Interfaces:
java.lang.Cloneable,org.apache.tools.ant.TaskContainer
public class Suite extends org.apache.tools.ant.Task implements org.apache.tools.ant.TaskContainerModeled after the TestSuite provided by jUnit.
-
-
Constructor Summary
Constructors Constructor Description Suite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFileset(org.apache.tools.ant.types.FileSet fs)Add a fileset to the suite.voidaddSuite(Suite s)Add a stuie to the suite.voidaddTask(org.apache.tools.ant.Task task)Add a task to execute, most likely a testcase, but really can be any task.voidaddTestCase(TestCase tc)Add a testcase to the suite.voidexecute()Run tests.intgetFailedCount()booleangetFailonerror()java.util.EnumerationgetFailures()java.lang.StringgetName()intgetPassedCount()intgetRanCount()java.lang.StringgetSummary()intgetTestCaseCount()intgetWarningCount()voidinit()protected voidloadTestFiles(org.apache.tools.ant.types.FileSet fs, java.util.Vector destination)Create TestCases from the files specified in a FileSet.voidsetAssertsenabled(boolean b)Should asserts be enabled? Asserts are enabled by default.voidsetEnabled(boolean b)Set to true if the test should be allowed to run.voidsetFailonerror(boolean f)voidsetName(java.lang.String s)Set a name for the suite, optional attribute.voidsetShowsummary(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
-
-
-
-
Method Detail
-
init
public void init()
- Overrides:
initin classorg.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:
addTaskin interfaceorg.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(java.lang.String s)
Set a name for the suite, optional attribute.- Parameters:
s- the name for the suite.
-
getName
public java.lang.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 java.util.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:
executein classorg.apache.tools.ant.Task
-
getSummary
public java.lang.String getSummary()
-
loadTestFiles
protected void loadTestFiles(org.apache.tools.ant.types.FileSet fs, java.util.Vector destination)Create TestCases from the files specified in a FileSet.- Parameters:
fs- the fileset to use for testcasesdestination- where to store the newly created TestCases.
-
-