Package com.sun.ts.lib.harness
Class EETest
java.lang.Object
com.sun.ts.lib.harness.EETest
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BaseUrlClient,- Client,- secformClient,- ServiceEETest
This abstract class must be extended by all clients of all J2EE-TS tests. All implementations of this class must
 define a setup, cleanup, and runtest(method names of runtest methods must match the 'testname' tag. EETest uses
 reflection to invoke these methods which in turn, run the test(s) to completion. Tests are assumed to pass, unless a
 Fault is thrown.
- Author:
- Kyle Grucci
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classThis exception must be thrown by all implentations of EETest to signify a test failure.static classThis exception is used only by EETest.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected PrintStreamprotected intprotected PrintStreamprotected String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StatusgetPropsReady(String[] argv, Properties p) protected PropertiesgetTestPropsFromArgs(String[] argv) protected PropertiesinitializeProperties(String sPropertiesFile) voidprints a string to the TestUtil error stream.voidprints a string to the TestUtil error stream.voidprints a string to the TestUtil log stream.voidprints a debug string to the TestUtil log stream.voidrun(String[] argv, PrintStream log, PrintStream err) This method is only called when test are run outside of JavaTest.run(String[] argv, PrintWriter log, PrintWriter err) This method is only called when tests are run outside of JavaTest or if the test is being run in the same VM as the harness.run(String[] argv, Properties p) This run method is the one that actually invokes reflection to figure out and invoke the testcase methods.run(String[] argv, Properties p, PrintWriter log, PrintWriter err) This method is only called from JavaTest to run a single testcase.protected StatusrunAllTestCases(String[] argv, Properties p, PrintWriter log, PrintWriter err) protected voidsetTestStatus(Status s, Throwable t) 
- 
Field Details- 
log
- 
err
- 
sTestCase
- 
iLogDelaySecondsprotected int iLogDelaySeconds
 
- 
- 
Constructor Details- 
EETestpublic EETest()
 
- 
- 
Method Details- 
getTestPropsFromArgs
- 
initializeProperties
- 
runThis method is only called when test are run outside of JavaTest. If a testcase name is passed within argv, then that testcase is run. Otherwise, all testcases within this implementation of EETest are run.- Parameters:
- argv- an array of arguments that a test may use
- log- Stream passed to TestUtil for standard loggin
- err- Writer passed to TestUtil for error logging
- Returns:
- a Javatest Statusobject (passed or failed)
 
- 
runThis method is only called when tests are run outside of JavaTest or if the test is being run in the same VM as the harness. If a testcase name is passed within argv, then that testcase is run. Otherwise, all testcases within this implementation of EETest are run.- Parameters:
- argv- an array of arguments that a test may use
- log- Writer passed to TestUtil for standard loggin
- err- Writer passed to TestUtil for error logging
- Returns:
- a Javatest Statusobject (passed or failed)
 
- 
setTestStatus
- 
runAllTestCases
- 
runThis method is only called from JavaTest to run a single testcase. All properties are determined from the source code tags.- Parameters:
- argv- an array of arguments that a test may use
- p- properties that are used by the testcase
- log- stream passed to TestUtil for standard logging
- err- stream passed to TestUtil for error logging
- Returns:
- a Javatest Status object (passed or failed)
 
- 
getPropsReady
- 
runThis run method is the one that actually invokes reflection to figure out and invoke the testcase methods.- Parameters:
- argv- an array of arguments that a test may use
- p- properties that are used by the testcase
- Returns:
- a Javatest Status object (passed or failed)
 
- 
logMsgprints a string to the TestUtil log stream. All tests should use this method for standard logging messages- Parameters:
- msg- string to print to the log stream
 
- 
logTraceprints a debug string to the TestUtil log stream. All tests should use this method for verbose logging messages. Whether or not the string is printed is determined by the last call to the TestUtil setTrace method.- Parameters:
- msg- string to print to the log stream
 
- 
logTrace
- 
logErrprints a string to the TestUtil error stream. All tests should use this method for error messages- Parameters:
- msg- string to print to the error stream
 
- 
logErrprints a string to the TestUtil error stream. All tests should use this method for error messages- Parameters:
- msg- string to print to the error stream
- e- a Throwable whose stacktrace gets printed
 
 
-