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 |
description
The description of this driver
|
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 java.util.List<EngineInterface> |
embeddedEngines |
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 Orderable |
orderable |
protected boolean |
perTableFlowControl
If true then local flow control blocks can be defined for each separate
test table (InputProcessor).
|
protected java.lang.String |
productName
The version of this driver
|
protected java.lang.String |
projectConfigPath |
protected java.lang.String |
projectRootDir |
protected java.lang.String |
safsDataServiceID |
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 |
protected java.lang.String |
version
The version of this driver
|
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.
|
void |
addEmbeddedEngine(EngineInterface embeddedEngine) |
StatusInterface |
addStatusCounts(StatusInterface incstatus) |
protected java.util.List<Engine> |
collectEngines(Framework framwork) |
protected Framework |
collectFramework() |
protected void |
collectHistory(User user,
Machine machine,
Framework framework,
java.util.List<Engine> engines) |
protected Machine |
collectMachine() |
protected User |
collectUser() |
protected void |
connectSAFSDataService()
Connect to the "SAFS Data Service".
The settings of "SAFS Data Service" can be specified by property: |
protected void |
disconnectSAFSDataService()
Disconnect from the "SAFS Data Service".
Wait the collection (of safs data information like machine, user, driver, engine and history etc.) to be finished. Update the end-time of the histories. We also disconnect from 'safs data service' once the collection is finished. |
EngineInterface |
getAutoItComponentSupport() |
java.lang.String |
getBenchDir() |
ConfigureInterface |
getConfigureInterface() |
protected ConfigureLocatorInterface |
getConfigureLocator(java.lang.String locatorClass)
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 |
getDescription()
The description of the version-able object
|
java.lang.String |
getDifDir() |
java.lang.String |
getDriverName() |
java.lang.String |
getDriverRootDir() |
java.util.List<EngineInterface> |
getEmbeddedEngines() |
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.
|
java.lang.String |
getProductName()
The name of the version-able object
|
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() |
java.lang.String |
getVersion()
The version number
|
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 void |
phoneHome()
Collection information and send them to the safs data repository.
|
protected RestModel |
phoneHome(RestModel restModel) |
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) |
void |
setDescription(java.lang.String desc)
set the description of the version-able object
|
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) |
void |
setProductName(java.lang.String productName)
set the name of the version-able object
|
long |
setProjectRootDir(java.lang.String absolute_path) |
long |
setRootVerifyDir(java.lang.String absolute_path) |
long |
setTestDir(java.lang.String absolute_path) |
void |
setVersion(java.lang.String version)
set the version number
|
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 Orderable orderable
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
protected java.lang.String safsDataServiceID
protected java.lang.String productName
protected java.lang.String version
protected java.lang.String description
protected java.util.List<EngineInterface> embeddedEngines
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 locatorClass)
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:
#logGENERIC(String, String)
,
#logPASSED(String, String)
,
#logFAILED(String, String)
,
#logWARNING(String, String)
,
LogsInterface.logMessage(org.safs.tools.logs.UniqueMessageInterface)
protected void connectSAFSDataService()
-Dsafs.data.protocol=http:// -Dsafs.data.host=safsdata -Dsafs.data.port=8080 -Dsafs.data.base.name=safsdata -Dsafs.data.server.url=http://host:8080/safsdataOr they can be specified in configuration file:
[SAFS_DATA_SERVICE] protocol=http:// host=safsdata port=8080 base.name=safsdata server.url=http://host:8080/safsdataThe property settings has higher priority than the settings in configuration file.
protected void disconnectSAFSDataService()
This should be called after the shutdown of the driver.
protected void phoneHome()
protected RestModel phoneHome(RestModel restModel) throws SAFSDatabaseException, SAFSModelCreationException
protected User collectUser() throws SAFSDatabaseException, SAFSModelCreationException
protected Machine collectMachine() throws SAFSDatabaseException, SAFSModelCreationException
protected Framework collectFramework() throws SAFSDatabaseException, SAFSModelCreationException
protected void collectHistory(User user, Machine machine, Framework framework, java.util.List<Engine> engines)
public void setProductName(java.lang.String productName)
Versionable
setProductName
in interface Versionable
public void setVersion(java.lang.String version)
Versionable
setVersion
in interface Versionable
public void setDescription(java.lang.String desc)
Versionable
setDescription
in interface Versionable
public java.lang.String getProductName()
Versionable
getProductName
in interface Versionable
public java.lang.String getVersion()
Versionable
getVersion
in interface Versionable
public java.lang.String getDescription()
Versionable
getDescription
in interface Versionable
public java.util.List<EngineInterface> getEmbeddedEngines()
getEmbeddedEngines
in interface DriverInterface
public void addEmbeddedEngine(EngineInterface embeddedEngine)
addEmbeddedEngine
in interface DriverInterface
Copyright © SAS Institute. All Rights Reserved.