public abstract class AbstractDriver extends java.lang.Object implements DriverInterface
| Modifier and Type | Field and Description |
|---|---|
protected AutoItComponent |
autoitcomponent
|
protected java.lang.String |
benchSource |
protected ConfigureInterface |
configInfo |
protected CoreInterface |
core |
UniqueStringCounterInfo |
counterInfo |
protected CountersInterface |
counts |
protected FlowControlInterface |
cycleflowcontrol
CYCLE shared flow control info used by all Driver/InputProcessors.
|
protected java.lang.String |
cycleLinkedFac |
protected long |
cycleLogMode |
protected java.lang.String |
cycleLogName |
protected java.lang.String |
cycleSeparator |
protected java.lang.String |
cycleSuffix |
protected java.lang.String |
datapoolSource |
protected DebugInterface |
debug |
protected java.lang.String |
difSource |
protected java.lang.String |
driverConfigPath |
protected java.lang.String |
driverName
Name of this Driver: Default = "SAFS/TIDriver"
|
protected java.lang.String |
driverRootDir |
protected boolean |
exitCycle |
protected boolean |
exitSuite |
protected boolean |
expressionsOn |
protected InputInterface |
input |
protected EngineInterface |
ipcommands
|
protected ConfigureLocatorInterface |
locator |
protected java.lang.String |
logLevel |
protected LogsInterface |
logs |
protected java.lang.String |
logsSource |
protected MapsInterface |
maps |
protected int |
millisBetweenRecords |
protected boolean |
perTableFlowControl
If true then local flow control blocks can be defined for each separate
test table (InputProcessor).
|
protected java.lang.String |
projectConfigPath |
protected java.lang.String |
projectRootDir |
protected StatusInterface |
statuscounts
|
protected FlowControlInterface |
stepflowcontrol
STEP shared flow control info used by all Driver/InputProcessors.
|
protected java.lang.String |
stepLinkedFac |
protected long |
stepLogMode |
protected java.lang.String |
stepLogName |
protected java.lang.String |
stepSeparator |
protected java.lang.String |
stepSuffix |
protected FlowControlInterface |
suiteflowcontrol
SUITE shared flow control info used by all Driver/InputProcessors.
|
protected java.lang.String |
suiteLinkedFac |
protected long |
suiteLogMode |
protected java.lang.String |
suiteLogName |
protected java.lang.String |
suiteSeparator |
protected java.lang.String |
suiteSuffix |
protected java.lang.String |
testLevel |
protected java.lang.String |
testName |
protected java.lang.String |
testSource |
protected EngineInterface |
tidcommands
|
protected EngineInterface |
tidcomponent
|
protected VarsInterface |
vars |
protected java.lang.String |
verifySource |
DRIVER_CONTROL_POF_VAR, DRIVER_CONTROL_POW_VAR, DRIVER_CONTROL_VAR| Constructor and Description |
|---|
AbstractDriver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConfigureInterfaceSource(ConfigureInterface source)
Initialize or append a ConfigureInterface to existing ones in the search order.
|
StatusInterface |
addStatusCounts(StatusInterface incstatus) |
EngineInterface |
getAutoItComponentSupport() |
java.lang.String |
getBenchDir() |
ConfigureInterface |
getConfigureInterface() |
protected ConfigureLocatorInterface |
getConfigureLocator(java.lang.String locatorInfo)
Locate a ConfigureLocatorInterface given the locatorInfo, presumably
provided from command-line options.
|
CoreInterface |
getCoreInterface()
Attempts to return an interface to the core framework through one of the existing interfaces.
|
CountersInterface |
getCountersInterface() |
long |
getCycleLogMode() |
java.lang.String |
getCycleLogName() |
java.lang.String |
getCycleSeparator() |
java.lang.String |
getCycleSuffix() |
java.lang.String |
getDatapoolDir() |
DebugInterface |
getDebugInterface() |
java.lang.String |
getDifDir() |
java.lang.String |
getDriverName() |
java.lang.String |
getDriverRootDir() |
FlowControlInterface |
getFlowControlInterface(java.lang.String testlevel) |
InputInterface |
getInputInterface() |
EngineInterface |
getIPDriverCommands() |
java.lang.String |
getLogLevel() |
java.lang.String |
getLogsDir() |
LogsInterface |
getLogsInterface() |
MapsInterface |
getMapsInterface() |
int |
getMillisBetweenRecords() |
protected java.lang.String |
getParameterValue(java.lang.String param)
Capture REQUIRED parameter values.
|
protected java.lang.String |
getProjectDirectoryInfo(java.lang.String configItem,
java.lang.String subdir,
boolean datapoolRelative)
Verify the existence of Project subdirectories.
|
java.lang.String |
getProjectRootDir() |
protected java.lang.String |
getRootDirectoryInfo(java.lang.String store,
java.lang.String configSection,
java.lang.String configItem)
Verify the existence of a "root" directory, like the Driver root or Project root.
|
java.lang.String |
getRootVerifyDir() |
StatusInterface |
getStatusInterface() |
long |
getStepLogMode() |
java.lang.String |
getStepLogName() |
java.lang.String |
getStepSeparator() |
java.lang.String |
getStepSuffix() |
long |
getSuiteLogMode() |
java.lang.String |
getSuiteLogName() |
java.lang.String |
getSuiteSeparator() |
java.lang.String |
getSuiteSuffix() |
java.lang.String |
getTestDir() |
java.lang.String |
getTestLevel() |
java.lang.String |
getTestName() |
EngineInterface |
getTIDDriverCommands() |
EngineInterface |
getTIDGUIlessComponentSupport() |
VarsInterface |
getVarsInterface() |
void |
incrementGeneralStatus(int status)
Increment General (not Test, means not T, TW, TF) record counts.
There is an exceptional case, the status is like DriverConstant.STATUS_TESTXXX_LOGGED, then increment the "test"(NOT "general") counter, keep consistent with InputProcessor. |
void |
incrementTestStatus(int status)
Increment Test Record (for T, TW, TF) counts.
|
boolean |
isExitCycle() |
boolean |
isExitSuite() |
boolean |
isExpressionsEnabled() |
protected static boolean |
isModifiedConfig() |
protected static boolean |
isModifiedRoot() |
boolean |
isPerTableFlowControl() |
void |
logMessage(java.lang.String msg,
java.lang.String msgdescription,
int msgtype)
Routine to log different message types to the active SAFS log.
|
protected java.lang.String |
processEmbeddedVariable(java.lang.String rootDir)
Checks to see if the path is (or startswith) an embedded variable.
Embedded variables are in the form %VARIABLE_NAME% and will be sought as System Properties, or System Environment variables. |
protected abstract StatusInterface |
processTest()
This is the one that actually opens and loops through our tests records!
Typically, DriverInterface subclasses like SAFSDRIVER will be used to provide
the concrete implementation.
|
protected static void |
resetModifiedProperties()
Clear System Properties for:
|
long |
setBenchDir(java.lang.String absolute_path) |
long |
setDatapoolDir(java.lang.String absolute_path) |
long |
setDifDir(java.lang.String absolute_path) |
void |
setExitCycle(boolean enabled) |
void |
setExitSuite(boolean enabled) |
void |
setExpressionsEnabled(boolean enabled) |
long |
setLogsDir(java.lang.String absolute_path) |
void |
setMillisBetweenRecords(int millisBetween) |
void |
setPerTableFlowControl(boolean enabled) |
long |
setProjectRootDir(java.lang.String absolute_path) |
long |
setRootVerifyDir(java.lang.String absolute_path) |
long |
setTestDir(java.lang.String absolute_path) |
protected void |
validateRootConfigureParameters(boolean datapoolRelative)
Verify the validity of REQUIRED parameters.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearEnginePreferences, endEnginePreference, getEnginePreferences, getEngines, getPreferredEngine, hasEnginePreferences, isPreferredEngine, isPreferredEngine, startEnginePreferenceprotected java.lang.String driverName
protected ConfigureInterface configInfo
protected InputInterface input
protected MapsInterface maps
protected VarsInterface vars
protected LogsInterface logs
protected CoreInterface core
protected CountersInterface counts
protected DebugInterface debug
protected AutoItComponent autoitcomponent
protected EngineInterface tidcommands
protected EngineInterface tidcomponent
protected EngineInterface ipcommands
protected StatusInterface statuscounts
public UniqueStringCounterInfo counterInfo
protected int millisBetweenRecords
protected FlowControlInterface cycleflowcontrol
protected FlowControlInterface suiteflowcontrol
protected FlowControlInterface stepflowcontrol
protected boolean perTableFlowControl
protected ConfigureLocatorInterface locator
protected java.lang.String driverRootDir
protected java.lang.String projectRootDir
protected java.lang.String driverConfigPath
protected java.lang.String projectConfigPath
protected java.lang.String datapoolSource
protected java.lang.String verifySource
protected java.lang.String benchSource
protected java.lang.String difSource
protected java.lang.String logsSource
protected java.lang.String testSource
protected java.lang.String testName
protected java.lang.String testLevel
protected java.lang.String cycleSuffix
protected java.lang.String cycleSeparator
protected java.lang.String suiteSuffix
protected java.lang.String suiteSeparator
protected java.lang.String stepSuffix
protected java.lang.String stepSeparator
protected java.lang.String logLevel
protected java.lang.String cycleLogName
protected long cycleLogMode
protected java.lang.String cycleLinkedFac
protected java.lang.String suiteLogName
protected long suiteLogMode
protected java.lang.String suiteLinkedFac
protected java.lang.String stepLogName
protected long stepLogMode
protected java.lang.String stepLinkedFac
protected boolean expressionsOn
protected boolean exitSuite
protected boolean exitCycle
public int getMillisBetweenRecords()
getMillisBetweenRecords in interface DriverInterfaceDriverInterface.getMillisBetweenRecords()public void setMillisBetweenRecords(int millisBetween)
setMillisBetweenRecords in interface DriverInterfaceDriverInterface.setMillisBetweenRecords(int)public boolean isPerTableFlowControl()
isPerTableFlowControl in interface DriverInterfaceDriverInterface.isPerTableFlowControl()public void setPerTableFlowControl(boolean enabled)
setPerTableFlowControl in interface DriverInterfaceDriverInterface.setPerTableFlowControl(boolean)public boolean isExitSuite()
isExitSuite in interface DriverInterfaceDriverInterface.isExitSuite()public void setExitSuite(boolean enabled)
setExitSuite in interface DriverInterfaceDriverInterface.setExitSuite(boolean)public boolean isExitCycle()
isExitCycle in interface DriverInterfaceDriverInterface.isExitCycle()public void setExitCycle(boolean enabled)
setExitCycle in interface DriverInterfaceDriverInterface.setExitCycle(boolean)public ConfigureInterface getConfigureInterface()
getConfigureInterface in interface DriverInterfaceDriverInterface.getConfigureInterface()public InputInterface getInputInterface()
getInputInterface in interface DriverInterfaceDriverInterface.getInputInterface()public MapsInterface getMapsInterface()
getMapsInterface in interface DriverInterfaceDriverInterface.getMapsInterface()public VarsInterface getVarsInterface()
getVarsInterface in interface DriverInterfaceDriverInterface.getVarsInterface()public LogsInterface getLogsInterface()
getLogsInterface in interface DriverInterfaceDriverInterface.getLogsInterface()public CoreInterface getCoreInterface()
getCoreInterface in interface DriverInterfaceDriverInterface.getCoreInterface()public CountersInterface getCountersInterface()
getCountersInterface in interface DriverInterfaceDriverInterface.getCountersInterface()public DebugInterface getDebugInterface()
getDebugInterface in interface DriverInterfaceDriverInterface.getDebugInterface()public FlowControlInterface getFlowControlInterface(java.lang.String testlevel)
getFlowControlInterface in interface DriverInterfaceDriverInterface.getFlowControlInterface(String)public StatusInterface getStatusInterface()
getStatusInterface in interface DriverInterfaceDriverInterface.getStatusInterface()public StatusInterface addStatusCounts(StatusInterface incstatus)
addStatusCounts in interface DriverInterfaceDriverInterface.addStatusCounts(StatusInterface)public void incrementGeneralStatus(int status)
incrementGeneralStatus in interface DriverInterfacestatus - StatusCodespublic void incrementTestStatus(int status)
incrementTestStatus in interface DriverInterfacestatus - StatusCodespublic java.lang.String getDriverName()
getDriverName in interface DriverInterfaceDriverInterface.getDriverName()public EngineInterface getTIDDriverCommands()
getTIDDriverCommands in interface DriverInterfaceDriverInterface.getTIDDriverCommands()public EngineInterface getAutoItComponentSupport()
getAutoItComponentSupport in interface DriverInterfaceDriverInterface.getAutoItComponentSupport()public EngineInterface getTIDGUIlessComponentSupport()
getTIDGUIlessComponentSupport in interface DriverInterfaceDriverInterface.getTIDGUIlessComponentSupport()public EngineInterface getIPDriverCommands()
getIPDriverCommands in interface DriverInterfaceDriverInterface.getIPDriverCommands()protected java.lang.String getParameterValue(java.lang.String param)
protected static void resetModifiedProperties()
protected static boolean isModifiedConfig()
protected static boolean isModifiedRoot()
protected java.lang.String processEmbeddedVariable(java.lang.String rootDir)
rootDir - public java.lang.String getDriverRootDir()
getDriverRootDir in interface DriverInterfacegetDriverRootDir in interface PathInterfacepublic java.lang.String getProjectRootDir()
getProjectRootDir in interface DriverInterfacegetProjectRootDir in interface PathInterfaceprotected ConfigureLocatorInterface getConfigureLocator(java.lang.String locatorInfo)
java.lang.IllegalArgumentException - if appropriate locator class cannot be
instantiated.protected void addConfigureInterfaceSource(ConfigureInterface source)
public long setProjectRootDir(java.lang.String absolute_path)
setProjectRootDir in interface DriverInterfaceprotected java.lang.String getProjectDirectoryInfo(java.lang.String configItem,
java.lang.String subdir,
boolean datapoolRelative)
configItem - is usually null if the default directory structure is in use. It
can contain an alternate directory specification, usually provided from a configuration
file. When provided as a relative path, it will be relative to the Project directory, not
the datapool directory.subdir - is the default subdirectory name to use/verify if configItem is null, or
does not resolve to a valid directory.java.lang.NullPointerException - if a directory cannot be resolved.protected void validateRootConfigureParameters(boolean datapoolRelative)
datapoolRelative - -- if forced to create project subdirectories, create them relative to the Datapool directory.
Otherwise, they will be considered relative to the Project directory.java.lang.IllegalArgumentException - if insufficient configuration information is
available from command-line parameters or configuration files.protected java.lang.String getRootDirectoryInfo(java.lang.String store,
java.lang.String configSection,
java.lang.String configItem)
java.lang.NullPointerException - if no valid directory can be found.public java.lang.String getRootVerifyDir()
getRootVerifyDir in interface DriverInterfacepublic long setRootVerifyDir(java.lang.String absolute_path)
setRootVerifyDir in interface DriverInterfacepublic java.lang.String getDatapoolDir()
getDatapoolDir in interface DriverInterfacegetDatapoolDir in interface PathInterfacepublic long setDatapoolDir(java.lang.String absolute_path)
setDatapoolDir in interface DriverInterfacepublic java.lang.String getBenchDir()
getBenchDir in interface DriverInterfacegetBenchDir in interface PathInterfacepublic long setBenchDir(java.lang.String absolute_path)
setBenchDir in interface DriverInterfacepublic java.lang.String getDifDir()
getDifDir in interface DriverInterfacegetDifDir in interface PathInterfacepublic long setDifDir(java.lang.String absolute_path)
setDifDir in interface DriverInterfacepublic java.lang.String getLogsDir()
getLogsDir in interface DriverInterfacegetLogsDir in interface PathInterfacepublic long setLogsDir(java.lang.String absolute_path)
setLogsDir in interface DriverInterfacepublic java.lang.String getTestDir()
getTestDir in interface DriverInterfacegetTestDir in interface PathInterfacepublic long setTestDir(java.lang.String absolute_path)
setTestDir in interface DriverInterfacepublic java.lang.String getTestName()
getTestName in interface DriverInterfaceDriverInterface.getTestName()public java.lang.String getTestLevel()
getTestLevel in interface DriverInterfaceDriverInterface.getTestLevel()public java.lang.String getCycleSuffix()
getCycleSuffix in interface DriverInterfaceDriverInterface.getCycleSuffix()public java.lang.String getCycleSeparator()
getCycleSeparator in interface DriverInterfaceDriverInterface.getCycleSeparator()public java.lang.String getSuiteSuffix()
getSuiteSuffix in interface DriverInterfaceDriverInterface.getSuiteSuffix()public java.lang.String getSuiteSeparator()
getSuiteSeparator in interface DriverInterfaceDriverInterface.getSuiteSeparator()public java.lang.String getStepSuffix()
getStepSuffix in interface DriverInterfaceDriverInterface.getStepSuffix()public java.lang.String getStepSeparator()
getStepSeparator in interface DriverInterfaceDriverInterface.getStepSeparator()public java.lang.String getLogLevel()
getLogLevel in interface DriverInterfaceDriverInterface.getLogLevel()public java.lang.String getCycleLogName()
getCycleLogName in interface DriverInterfaceDriverInterface.getCycleLogName()public long getCycleLogMode()
getCycleLogMode in interface DriverInterfaceDriverInterface.getCycleLogMode()public java.lang.String getSuiteLogName()
getSuiteLogName in interface DriverInterfaceDriverInterface.getSuiteLogName()public long getSuiteLogMode()
getSuiteLogMode in interface DriverInterfaceDriverInterface.getSuiteLogMode()public java.lang.String getStepLogName()
getStepLogName in interface DriverInterfaceDriverInterface.getStepLogName()public long getStepLogMode()
getStepLogMode in interface DriverInterfaceDriverInterface.getStepLogMode()public boolean isExpressionsEnabled()
isExpressionsEnabled in interface DriverInterfaceDriverInterface.isExpressionsEnabled()public void setExpressionsEnabled(boolean enabled)
setExpressionsEnabled in interface DriverInterfaceDriverInterface.setExpressionsEnabled(boolean)protected abstract StatusInterface processTest()
SAFSDRIVER.processTest()public void logMessage(java.lang.String msg,
java.lang.String msgdescription,
int msgtype)
logMessage in interface DriverInterfacemessage - String messagedescription - String (optional) for more detailed info. Can be null.type - int message type constant from AbstractLogFacility.
Some Message Types:
AbstractLogFacility#GENERIC_MESSAGE
AbstractLogFacility#PASSED_MESSAGE
AbstractLogFacility#FAILED_MESSAGE
AbstractLogFacility#FAILED_OK_MESSAGE
AbstractLogFacility#WARNING_MESSAGE
AbstractLogFacility#WARNING_OK_MESSAGE
#logGENERIC(String, String),
#logPASSED(String, String),
#logFAILED(String, String),
#logWARNING(String, String),
LogsInterface.logMessage(org.safs.tools.logs.UniqueMessageInterface)Copyright © SAS Institute. All Rights Reserved.