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, wait
clearEnginePreferences, endEnginePreference, getEnginePreferences, getEngines, getPreferredEngine, hasEnginePreferences, isPreferredEngine, isPreferredEngine, startEnginePreference
protected 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 DriverInterface
DriverInterface.getMillisBetweenRecords()
public void setMillisBetweenRecords(int millisBetween)
setMillisBetweenRecords
in interface DriverInterface
DriverInterface.setMillisBetweenRecords(int)
public boolean isPerTableFlowControl()
isPerTableFlowControl
in interface DriverInterface
DriverInterface.isPerTableFlowControl()
public void setPerTableFlowControl(boolean enabled)
setPerTableFlowControl
in interface DriverInterface
DriverInterface.setPerTableFlowControl(boolean)
public boolean isExitSuite()
isExitSuite
in interface DriverInterface
DriverInterface.isExitSuite()
public void setExitSuite(boolean enabled)
setExitSuite
in interface DriverInterface
DriverInterface.setExitSuite(boolean)
public boolean isExitCycle()
isExitCycle
in interface DriverInterface
DriverInterface.isExitCycle()
public void setExitCycle(boolean enabled)
setExitCycle
in interface DriverInterface
DriverInterface.setExitCycle(boolean)
public ConfigureInterface getConfigureInterface()
getConfigureInterface
in interface DriverInterface
DriverInterface.getConfigureInterface()
public InputInterface getInputInterface()
getInputInterface
in interface DriverInterface
DriverInterface.getInputInterface()
public MapsInterface getMapsInterface()
getMapsInterface
in interface DriverInterface
DriverInterface.getMapsInterface()
public VarsInterface getVarsInterface()
getVarsInterface
in interface DriverInterface
DriverInterface.getVarsInterface()
public LogsInterface getLogsInterface()
getLogsInterface
in interface DriverInterface
DriverInterface.getLogsInterface()
public CoreInterface getCoreInterface()
getCoreInterface
in interface DriverInterface
DriverInterface.getCoreInterface()
public CountersInterface getCountersInterface()
getCountersInterface
in interface DriverInterface
DriverInterface.getCountersInterface()
public DebugInterface getDebugInterface()
getDebugInterface
in interface DriverInterface
DriverInterface.getDebugInterface()
public FlowControlInterface getFlowControlInterface(java.lang.String testlevel)
getFlowControlInterface
in interface DriverInterface
DriverInterface.getFlowControlInterface(String)
public StatusInterface getStatusInterface()
getStatusInterface
in interface DriverInterface
DriverInterface.getStatusInterface()
public StatusInterface addStatusCounts(StatusInterface incstatus)
addStatusCounts
in interface DriverInterface
DriverInterface.addStatusCounts(StatusInterface)
public void incrementGeneralStatus(int status)
incrementGeneralStatus
in interface DriverInterface
status
- StatusCodes
public void incrementTestStatus(int status)
incrementTestStatus
in interface DriverInterface
status
- StatusCodes
public java.lang.String getDriverName()
getDriverName
in interface DriverInterface
DriverInterface.getDriverName()
public EngineInterface getTIDDriverCommands()
getTIDDriverCommands
in interface DriverInterface
DriverInterface.getTIDDriverCommands()
public EngineInterface getAutoItComponentSupport()
getAutoItComponentSupport
in interface DriverInterface
DriverInterface.getAutoItComponentSupport()
public EngineInterface getTIDGUIlessComponentSupport()
getTIDGUIlessComponentSupport
in interface DriverInterface
DriverInterface.getTIDGUIlessComponentSupport()
public EngineInterface getIPDriverCommands()
getIPDriverCommands
in interface DriverInterface
DriverInterface.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 DriverInterface
getDriverRootDir
in interface PathInterface
public java.lang.String getProjectRootDir()
getProjectRootDir
in interface DriverInterface
getProjectRootDir
in interface PathInterface
protected 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 DriverInterface
protected 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 DriverInterface
public long setRootVerifyDir(java.lang.String absolute_path)
setRootVerifyDir
in interface DriverInterface
public java.lang.String getDatapoolDir()
getDatapoolDir
in interface DriverInterface
getDatapoolDir
in interface PathInterface
public long setDatapoolDir(java.lang.String absolute_path)
setDatapoolDir
in interface DriverInterface
public java.lang.String getBenchDir()
getBenchDir
in interface DriverInterface
getBenchDir
in interface PathInterface
public long setBenchDir(java.lang.String absolute_path)
setBenchDir
in interface DriverInterface
public java.lang.String getDifDir()
getDifDir
in interface DriverInterface
getDifDir
in interface PathInterface
public long setDifDir(java.lang.String absolute_path)
setDifDir
in interface DriverInterface
public java.lang.String getLogsDir()
getLogsDir
in interface DriverInterface
getLogsDir
in interface PathInterface
public long setLogsDir(java.lang.String absolute_path)
setLogsDir
in interface DriverInterface
public java.lang.String getTestDir()
getTestDir
in interface DriverInterface
getTestDir
in interface PathInterface
public long setTestDir(java.lang.String absolute_path)
setTestDir
in interface DriverInterface
public java.lang.String getTestName()
getTestName
in interface DriverInterface
DriverInterface.getTestName()
public java.lang.String getTestLevel()
getTestLevel
in interface DriverInterface
DriverInterface.getTestLevel()
public java.lang.String getCycleSuffix()
getCycleSuffix
in interface DriverInterface
DriverInterface.getCycleSuffix()
public java.lang.String getCycleSeparator()
getCycleSeparator
in interface DriverInterface
DriverInterface.getCycleSeparator()
public java.lang.String getSuiteSuffix()
getSuiteSuffix
in interface DriverInterface
DriverInterface.getSuiteSuffix()
public java.lang.String getSuiteSeparator()
getSuiteSeparator
in interface DriverInterface
DriverInterface.getSuiteSeparator()
public java.lang.String getStepSuffix()
getStepSuffix
in interface DriverInterface
DriverInterface.getStepSuffix()
public java.lang.String getStepSeparator()
getStepSeparator
in interface DriverInterface
DriverInterface.getStepSeparator()
public java.lang.String getLogLevel()
getLogLevel
in interface DriverInterface
DriverInterface.getLogLevel()
public java.lang.String getCycleLogName()
getCycleLogName
in interface DriverInterface
DriverInterface.getCycleLogName()
public long getCycleLogMode()
getCycleLogMode
in interface DriverInterface
DriverInterface.getCycleLogMode()
public java.lang.String getSuiteLogName()
getSuiteLogName
in interface DriverInterface
DriverInterface.getSuiteLogName()
public long getSuiteLogMode()
getSuiteLogMode
in interface DriverInterface
DriverInterface.getSuiteLogMode()
public java.lang.String getStepLogName()
getStepLogName
in interface DriverInterface
DriverInterface.getStepLogName()
public long getStepLogMode()
getStepLogMode
in interface DriverInterface
DriverInterface.getStepLogMode()
public boolean isExpressionsEnabled()
isExpressionsEnabled
in interface DriverInterface
DriverInterface.isExpressionsEnabled()
public void setExpressionsEnabled(boolean enabled)
setExpressionsEnabled
in interface DriverInterface
DriverInterface.setExpressionsEnabled(boolean)
protected abstract StatusInterface processTest()
SAFSDRIVER.processTest()
public void logMessage(java.lang.String msg, java.lang.String msgdescription, int msgtype)
logMessage
in interface DriverInterface
message
- 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.