public class InputProcessor extends AbstractInputProcessor
Modifier and Type | Field and Description |
---|---|
protected UniqueIDInterface |
logid
The unique ID of the log we are to use.
|
static java.lang.String |
PRODUCT_DESCRIPTION
'The Processor to handle each record from test table.'
|
static java.lang.String |
PRODUCT_NAME
'Input Processor'
|
static java.lang.String |
PRODUCT_VERSION
'1.0'
|
protected SourceInterface |
sourceid
The input source name provided when initialized.
|
autoitComponentCommands, counterInfo, description, driver, embeddedEngines, localFlowControlInterface, PREFERRED_ENGINES_OVERRIDE, productName, RESOLVE_SKIPPED_RECORDS, statusCounter, testRecordData, tidComponentCommands, tidDriverCommands, version
DRIVER_CONTROL_POF_VAR, DRIVER_CONTROL_POW_VAR, DRIVER_CONTROL_VAR
Constructor and Description |
---|
InputProcessor(DriverInterface driver,
SourceInterface sourceid,
UniqueIDInterface logid)
Constructor for InputProcessor
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkTestLevelForStepExecution()
The current InputProcessor will be set to org.safs.model.tools.Driver, so that it can be used to execute 'test record'
within Java code.
|
CoreInterface |
getCoreInterface()
Attempts to return an interface to the core framework through the existing DriverInterface.
|
java.lang.String |
getDefaultSeparator()
Overridden by specific SourceInterface we own.
|
java.lang.String |
getTestLevel()
Overridden by specific SourceInterface we own.
|
java.lang.String |
getTestName()
Overridden by specific SourceInterface we own.
|
protected UniqueStringFileInfo |
getUniqueSourceInfo()
Generate a unique ID with the testname as root.
|
TestRecordHelper |
initTestRecordData(java.lang.String record,
java.lang.String separator) |
long |
locateBlockID(InputInterface input,
UniqueSourceInterface sourceinfo,
java.lang.String blockID)
Attempts to move the input pointer to the beginning of the record AFTER
the blockID specified.
|
void |
logMessage(java.lang.String msg,
java.lang.String msgdescription,
int msgtype)
Convenience routine for building the appropriate MessageInfo and logging
a message to our active log.
|
protected long |
processBlockIDRecord(TestRecordHelper trd)
Process a BlockID (B) input record.
|
protected long |
processComponentFunction(TestRecordHelper trd)
Process a Step Level test record -- a component function.
|
long |
processDriverCommand(TestRecordHelper trd)
Process a Driver Command (C,CW,or CF) input record.
|
protected long |
processEngineCommand(TestRecordHelper trd)
Process an Engine Command (E) input record.
|
protected long |
processImpliedCallScriptRecord(TestRecordHelper trd)
Process an Implied CallScript (unknown record type) input record .
|
protected long |
processSkippedRecord(TestRecordHelper trd)
Process a Skipped (S) input record.
|
StatusInterface |
processTest()
This is the one that actually opens and loops through our tests records!
|
long |
processTestRecord(TestRecordHelper trd)
Process a Test (T,TW,or TF) input record.
|
void |
resetTestLevel()
Reset those private fields about the 'test level'.
|
protected long |
routeToEngines(TestRecordHelper trd,
boolean sendAll)
Route the input record to one or more engines, or all engines.
|
protected long |
routeToPreferredEngines(TestRecordHelper trd)
Route the input record to preferred engines only in the order of preference.
|
addEmbeddedEngine, addStatusCounts, clearEnginePreferences, endEnginePreference, getAutoItComponentSupport, getBenchDir, getConfigureInterface, getCountersInterface, getCycleLogMode, getCycleLogName, getCycleSeparator, getCycleSuffix, getDatapoolDir, getDebugInterface, getDescription, getDifDir, getDriverName, getDriverRootDir, getEmbeddedEngines, getEnginePreferences, getEngines, getFlowControlInterface, getInputInterface, getIPDriverCommands, getLogLevel, getLogsDir, getLogsInterface, getMapsInterface, getMillisBetweenRecords, getPreferredEngine, getProductName, getProjectRootDir, getRootVerifyDir, getStatusInterface, getStepLogMode, getStepLogName, getStepSeparator, getStepSuffix, getSuiteLogMode, getSuiteLogName, getSuiteSeparator, getSuiteSuffix, getTestDir, getTestRecordData, getTIDDriverCommands, getTIDGUIlessComponentSupport, getVarsInterface, getVersion, hasEnginePreferences, incrementGeneralStatus, incrementTestStatus, isExitCycle, isExitSuite, isExpressionsEnabled, isPerTableFlowControl, isPreferredEngine, isPreferredEngine, setBenchDir, setDatapoolDir, setDescription, setDifDir, setExitCycle, setExitSuite, setExpressionsEnabled, setLogsDir, setMillisBetweenRecords, setPerTableFlowControl, setProductName, setProjectRootDir, setRootVerifyDir, setTestDir, setVersion, startEnginePreference
public static final java.lang.String PRODUCT_NAME
public static final java.lang.String PRODUCT_VERSION
public static final java.lang.String PRODUCT_DESCRIPTION
protected SourceInterface sourceid
getUniqueSourceInfo()
for that, instead. This field has only the test/file name, test level, and
separator.protected UniqueIDInterface logid
public InputProcessor(DriverInterface driver, SourceInterface sourceid, UniqueIDInterface logid)
public boolean checkTestLevelForStepExecution()
The current InputProcessor will be set to org.safs.model.tools.Driver, so that it can be used to execute 'test record' within Java code. If the 'test record' is 'driver command', there is no problem; while if the 'test record' is 'component function' and the InputProcessor is NOT at Step level, the 'component function' will be treated as 'Switch Suite'/'Switch Step' and fail. For example, if InputProcessor is at Cycle level, then "T, Window, Component, VerifyValues, a, b", will be treated to execute Window.STD suite file. To avoid this situation, we need to set the field 'isStep' before executing 'component function'. This function is for this purpose.
isStep
has been changed.processTest()
,
resetTestLevel()
,
AbstractDriver.runComponentFunctionConverted(String, String, String, String...)
public void resetTestLevel()
public void logMessage(java.lang.String msg, java.lang.String msgdescription, int msgtype)
AbstractLogFacility
public java.lang.String getTestName()
getTestName
in interface DriverInterface
getTestName
in class AbstractInputProcessor
SourceInterface.getSourceName()
public java.lang.String getTestLevel()
getTestLevel
in interface DriverInterface
getTestLevel
in class AbstractInputProcessor
SourceInterface.getTestLevel()
public java.lang.String getDefaultSeparator()
SourceInterface.getDefaultSeparator()
protected UniqueStringFileInfo getUniqueSourceInfo()
public long locateBlockID(InputInterface input, UniqueSourceInterface sourceinfo, java.lang.String blockID)
On failure, increments the general failure count of the local statuscounter and all active public counters. Does not increment counters on success as we are just attempting to move the input pointer for the next input record.
protected long routeToPreferredEngines(TestRecordHelper trd)
protected long routeToEngines(TestRecordHelper trd, boolean sendAll)
If 'sendAll' is TRUE, it means the record needs to be processed by EVERY engine, regardless of the response from any one engine. For example, if the driver must tell each engine to clear a cache, or something.
if 'sendAll' is FALSE, we will not route to any engine that is 'preferred' because all 'preferred' engines should have already been tried.
public long processDriverCommand(TestRecordHelper trd)
protected long processEngineCommand(TestRecordHelper trd)
protected long processComponentFunction(TestRecordHelper trd)
public long processTestRecord(TestRecordHelper trd)
protected long processSkippedRecord(TestRecordHelper trd)
protected long processBlockIDRecord(TestRecordHelper trd)
protected long processImpliedCallScriptRecord(TestRecordHelper trd)
public TestRecordHelper initTestRecordData(java.lang.String record, java.lang.String separator)
public StatusInterface processTest()
getUniqueSourceInfo()
public CoreInterface getCoreInterface()
DriverInterface.getCoreInterface()
Copyright © SAS Institute. All Rights Reserved.