|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | CONST | FIELD | CONSTR | METHOD | DETAIL: CONST | FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--satin.testing.Test
|
+--satin.testing.TestProgram
|
+--satin.testing.TestSuite
public final class TestSuite
extends TestProgram
Base class for a test suite
A TestSuite executes one or more TestPrograms. This class is a standalone executable
program and should not be subclassed.
TestSuite class recognizes all of the
command-line switches recognized by
TestProgram.
-suite fileName
1. Create a suite parameter file
2. Execute the TestSuite class and pass the suite parameter file with a -suite command line argument.
Suite Parameter Files look like:
Grammatical Spec:
classType [NEWLOG] className cmdLineArgs
classType can be script or suite
NEWLOG is an optional identifier (see below)
className is the fully qualified class name (as a string) of the class to instantiate and run
cmdLineArgs is a string containing the arguments you would specify on the command line if you ran that
class standalone.
Example:
//--------------------------------------------------------------- //Suite Param File //--------------------------------------------------------------- script "myScript" "-params foo.param -data test.param" suite NEWLOG "mySuite" "-log o:\myLog -suite suite.param"You run a suite by issuing the following on the command line:
java satin.testing.TestSuite -log myLogFile -suite mySuiteParamFile.param
TestLog and String[] as its two arguments
in that order. Note: the main function will never be executed, only the run method.
| Fields inherited from class satin.testing.TestProgram |
log |
| Fields inherited from class satin.testing.Test |
lastException |
| Constructor Summary | |
TestSuite(TestLog log,
java.lang.String[] cmdLineArgs)
The constructor. |
|
| Method Summary | |
protected void |
createParams()
Creates the parameter sets for the test suite |
static final TestScript |
createScriptInstance(java.lang.String className,
TestLog theLog,
java.lang.String[] cmdLineArgs)
Creates an instance of a TestScript based on its class name. |
static final TestSuite |
createSuiteInstance(java.lang.String className,
TestLog theLog,
java.lang.String[] cmdLineArgs)
Creates an instance of a TestSuite. |
protected SuiteParams |
createSuiteParams()
Creates the suite parameter set. |
protected void |
defineCmdLineArgs(CmdLineParser p)
Defines command line arguments. |
protected void |
execute()
Iterates the class list loaded from the parameter file and runs each TestProgram. |
static void |
main(java.lang.String[] args)
Entry point to the TestSuite class. |
| Methods inherited from class satin.testing.TestProgram |
createLogFile, doSetup, getLog |
| Methods inherited from class satin.testing.Test |
cleanup, doCleanup, doExecute, doVerify, run, setup, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TestSuite(TestLog log,
java.lang.String[] cmdLineArgs)
throws java.lang.Exception
logcmdLineArgs| Method Detail |
public static void main(java.lang.String[] args)
throws java.lang.Exception
protected void execute()
throws java.lang.Exception
execute in class Test
public static final TestScript createScriptInstance(java.lang.String className,
TestLog theLog,
java.lang.String[] cmdLineArgs)
throws java.lang.Exception
classNametheLogcmdLineArgs
public static final TestSuite createSuiteInstance(java.lang.String className,
TestLog theLog,
java.lang.String[] cmdLineArgs)
throws java.lang.Exception
classNametheLogcmdLineArgs
protected void createParams()
throws ParamError
createParams in class TestProgram
protected SuiteParams createSuiteParams()
throws ParamError
protected void defineCmdLineArgs(CmdLineParser p)
TestProgram
define***
methods of CmdLineParser.
If you override this method, be sure to call the inherited method
first, before defining your own arguments.
defineCmdLineArgs in class TestProgram| Revision History |
7/31/01 Ed Stauff - made changes per code review.
7/30/01 Andy Griffin - touched up UltraEdit/JBuilder formatting and yanked debug print statements
5/31/01 Ed Stauff - moved logBlock from public to private scope.
5/16/01 Andy Griffin - functionality written
4/10/01 Ed Stauff - file created.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | CONST | FIELD | CONSTR | METHOD | DETAIL: CONST | FIELD | CONSTR | METHOD | ||||||||
TestSuite.java (PRIVATE SOURCES)