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:
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
addTestCase
(TestCase tc) Add a testcase to the suite.void
execute()
Run tests.int
boolean
getName()
int
int
int
int
void
init()
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
-
Constructor Details
-
Suite
public Suite()
-
-
Method Details
-
init
public void init()- Overrides:
init
in classorg.apache.tools.ant.Task
-
addTestCase
Add a testcase to the suite.- Parameters:
tc
- the testcase to add
-
addSuite
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 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
Set a name for the suite, optional attribute.- Parameters:
s
- the name for the suite.
-
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
- 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 classorg.apache.tools.ant.Task
-
getSummary
-
loadTestFiles
Create TestCases from the files specified in a FileSet.- Parameters:
fs
- the fileset to use for testcasesdestination
- where to store the newly created TestCases.
-