|
|||||||||
| 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
public abstract class TestProgram
extends TestBase class for a test that is independently runnable as a separate program. This class provides the following support:
TestProgram class recognizes the following
command-line switches:
-logFile fileName
main method.
-appendLog
-echoLog
-autoFlush
autoFlush variable in the
LogFile object, which causes each line of output
to be flushed to disk immediately after it is written.
defineCmdLineArgs method.
| Field Summary | |
TestLog |
log
The log for this test program. |
| Fields inherited from class satin.testing.Test |
lastException |
| Constructor Summary | |
TestProgram(TestLog log,
java.lang.String[] cmdLineArgs)
The constructor. |
|
| Method Summary | |
protected static TestLogInternal |
createLogFile(java.lang.String programName,
boolean append)
Creates the log file. |
protected abstract void |
createParams()
Creates the parameter set for the test program. |
protected void |
defineCmdLineArgs(CmdLineParser p)
Defines command line arguments. |
protected boolean |
doSetup()
Performs the setup phase, catching and reporting any exceptions. |
final TestLog |
getLog()
Returns the log file. |
| Methods inherited from class satin.testing.Test |
cleanup, doCleanup, doExecute, doVerify, execute, run, setup, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public TestLog log
getLog
method interchangeably.
Never change the value of this field!| Constructor Detail |
public TestProgram(TestLog log,
java.lang.String[] cmdLineArgs)
throws java.lang.Exception
logcmdLineArgs| Method Detail |
protected void defineCmdLineArgs(CmdLineParser p)
define***
methods of CmdLineParser.
If you override this method, be sure to call the inherited method
first, before defining your own arguments.
protected boolean doSetup()
throws java.io.IOException
Test
setup
instead.
Do not call this method from any method except
run.
doSetup in class Test
satin.testing.Test
setup threw an exception; true otherwise.
protected abstract void createParams()
throws ParamError
protected static TestLogInternal createLogFile(java.lang.String programName,
boolean append)
throws java.io.IOException
TestLogInternal.public final TestLog getLog()
log
field interchangeably; this method is provided for use in the base
Test class, which does not have access
to a log field.
getLog in class Test| Revision History |
7/31/01 Ed Stauff - made changes per code review.
5/31/01 Ed Stauff - removed final from log field; made programName field package scope instead of public; replaced handleCmdLine and printHelp with defineCmdLineArgs.
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 | ||||||||
TestProgram.java (PRIVATE SOURCES)