jetif
Class Suite
java.lang.Object
jetif.Suite
- Direct Known Subclasses:
- BasicSuite
- public abstract class Suite
- extends Object
This class Suite allows users to setup and cleanup environment
for the whole suite, and provides information and reference of the test object.
A user defined suite class should extends this class and implements the
createTestCase(String, String) at least.
- Author:
- Vicky Wang
- See Also:
BasicSuite
|
Constructor Summary |
Suite()
A custom suite class should implements a default constructor without any parameter.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected String name
- The name of this suite.
This member variable is not available during construction.
props
protected Properties props
- The properties of this suite.
Be careful to modify this properties because other parts may refer
to this properties.
This member variable is not available during construction.
logger
protected Logger logger
- The logger object of this suite.
This memeber variable allows custom code use the logging mechanism.
Suite
public Suite()
- A custom suite class should implements a default constructor without any parameter.
The framework will call only the default constructor to create suite instance.
newSuite
public static Suite newSuite(String className)
throws CreateSuiteException
- Create a new suite instance from specified class name.
The class should be inherited from
jetif.Suite.
- Parameters:
className - the name of the class.
- Returns:
- the suite instance.
- Throws:
CreateSuiteException - if error occurs when create the suite instance.
getName
public String getName()
- Returns the name of this suite.
- Returns:
- the name
setup
protected boolean setup()
- Set up the testing environment for this suite.
The framework will skip the whole suite if the return value is false.
- Returns:
- true if setup is completed successfully.
createTestCase
protected TestCase createTestCase(String name,
String uid)
throws FrameworkException
- Create a test case for testing. The implementation should provides a test case
object to run the test case.
- Parameters:
name - the name of the test case.uid - the UID of the test case.
- Returns:
- a test case object.
- Throws:
FrameworkException
createTestCases
protected List createTestCases(String name,
String uid)
throws FrameworkException
- Create test cases for testing. The implementation should provides at least one test case
instance in the list to run testing.
- Parameters:
name - the name of the test case from spec.uid - the UID of the test case from spec.
- Returns:
- a list of test cases (each element should be of type TestCase);
- Throws:
FrameworkException
cleanup
protected void cleanup(boolean flag)
- Clean up the testing environment for this suite.
- Parameters:
flag - the return value of setup() method.
Copyright © 2004,2005 Vicky Wang - All Rights Reserved.