public abstract class DriverCommand extends Processor
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
command
The current command keyword being executed.
|
protected java.util.Iterator<java.lang.String> |
iterator
Used to iterate over any params provided for a command.
|
protected DDGUIUtilities |
utils
Provide the GUI Utilities, sub-class may has its own implementation.
|
breakpointsOn, CASE_INSENSITIVE_FLAG, CASEINSENSITIVE_FLAG, clearProxiesAlways, commandLineBreakpoint, customStr, customText, DEBUG_MESSAGE, debugStr, debugText, DEFAULT_CUSTOM_PROCESSOR_PACKAGE, DEFAULT_CUSTOM_PROCESSOR_SUBPACKAGE, DEFAULT_PROCESSOR_PACKAGE, FAILED_MESSAGE, FAILED_OK_MESSAGE, failedStr, failedText, FAILURE_DETAIL, GENERIC_MESSAGE, genericStr, genericText, LINE_FAILURE_4, log, myBreakpointsOn, otherStr, otherText, PARAM_SIZE_1, PARAM_SIZE_2, PARAM_SIZE_3, PARAM_SIZE_4, params, PASSED_MESSAGE, passedStr, passedText, PRE_TXT_SUCCESS_4, PRE_TXT_SUCCESS_5, processorConfigSet, processorMap, recordProcessed, RECTYPE_DRIVER_COMMAND, RECTYPE_DRIVER_COMMAND_F, RECTYPE_DRIVER_COMMAND_W, RECTYPE_TEST_STEP, RECTYPE_TEST_STEP_F, RECTYPE_TEST_STEP_W, RFSMCache, RFSMOnly, RFT_FIND_SEARCH_MODE_ALGORITHM, RFT_FIND_SEARCH_MODE_CACHE, SAFS_CLEARPROXIESALWAYS_ITEM, SAFS_COMMANDLINEBREAKPOINT_ITEM, SAFS_COMMANDLINEBREAKPOINT_VARIABLE, SAFS_PARAMS_FILE, SAFS_RESBUN_NAME, SAFS_SECSWAITFORCOMPONENT_ITEM, SAFS_SECSWAITFORCOMPONENT_VARIABLE, SAFS_SECSWAITFORWINDOW_ITEM, SAFS_SECSWAITFORWINDOW_VARIABLE, SAFS_TESTDOMAINS_ITEM, SAFS_TESTDOMAINS_VARIABLE, secsWaitForComponent, secsWaitForWindow, SENT_MSG_3, testDomains, testRecordData, testrecordStackable, TXT_FAILURE_1, TXT_FAILURE_2, TXT_FAILURE_3, TXT_FAILURE_4, TXT_FAILURE_5, TXT_SUCCESS_1, TXT_SUCCESS_2, TXT_SUCCESS_2a, TXT_SUCCESS_3, TXT_SUCCESS_3a, TXT_SUCCESS_4, TXT_SUCCESS_5, unexpectedAlertBehaviour, WARNING_MESSAGE, WARNING_OK_MESSAGE, warningStr, warningText
Constructor and Description |
---|
DriverCommand()
Purpose: constructor |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkGUIExistence(boolean expectedExist,
java.lang.String mapNam,
java.lang.String window,
java.lang.String component,
int timeoutInSeconds)
Check the existence of the window/component and return the satisfaction of the existence.
The satisfaction depends on component's existence and our expectation of its existence. Subclass only need to implement this method to get the following keywords work. |
protected void |
commandProcess()
Process the driver command specifically.
|
protected java.lang.String |
getStandardFailureDetail()
Uses testRecordData to create standard failure text.
|
protected java.lang.String |
getStandardWarningDetail()
Uses testRecordData to create standard warning text.
|
protected void |
init()
Initialize test record, utilities.
|
protected java.util.Collection |
interpretFields()
Purpose: Interprets the fields of the driver command record and puts the appropriate values into the fields of testRecordData. |
protected void |
issueActionUsingNegativeMessage(java.lang.String x,
java.lang.String detail)
"[Action] using [x] finished with a negative result."
"[detail]" * @param detail -- a detail message already properly localized, if necessary. |
protected void |
issueActionWarning(java.lang.String warning)
Issue [command] was not successful.
|
protected void |
issueExecutionNegativeMessage(java.lang.String detail)
"Action processed with a negative result."
"[detail]" Purpose: set failure status and log a simple failure message when a test record got processed with negative result. |
protected void |
issueFileErrorFailure(java.lang.String filename)
Issue a file error and failure message
Filename does not need to be localized.
|
protected void |
issueGenericSuccess(java.lang.String comment)
issue OK status and generic message (not a PASSED message)
[action] successful. |
protected void |
issueGenericSuccess(java.lang.String comment,
java.lang.String detail)
issue OK status and generic message (not a PASSED message):
[action] successful. |
protected void |
issueGenericSuccessUsing(java.lang.String x,
java.lang.String comment)
issue OK status and Generic message (not a PASSED message):
[action] successful using [x]. |
protected void |
issueParameterCountFailure()
Issue parameter count error and failure message
|
protected void |
issueParameterCountFailure(java.lang.String detail)
Issue parameter count error and failure message
|
protected void |
issueParameterValueFailure(java.lang.String paramName)
Issue parameter value error and failure message along with a failure status.
|
protected void |
issuePassedSuccess(java.lang.String comment)
issue OK status and PASSED message.
[action] successful. |
protected void |
issueUnknownErrorFailure(java.lang.String cause)
Issue a generic error and failure message
The cause parameter is expected to already be localized.
|
boolean |
isSupportedRecordType(java.lang.String recordType)
Supports standard DRIVER COMMAND record types (C, CW, CF)
|
protected void |
localProcess()
This superclass implementation does absolutely nothing.
|
void |
process()
The primary method that all subclasses must implement.
|
activateBreakpoint, checkBreakpoints, checkMyBreakpoints, deduceBenchFile, deduceDiffFile, deduceProjectFile, deduceTestFile, delay, distributeConfigInformation, getAbsolutFileName, getAlternateParams, getAppMapItem, getChainedProcessor, getClassInstance, getClearProxiesAlways, getCustomProcClassNames, getCustomProcInstancePath, getLogUtilities, getParams, getProcClassNames, getProcInstance, getProcInstancePath, getRequiredField, getSecsWaitForComponent, getSecsWaitForWindow, getStandardErrorMessage, getTestRecordData, getUnexpectedAlertBehaviour, getVariable, hasChainedProcessor, initProcessorAndProcess, instanceProcessorAndProcess, isBreakpointsOn, isComponentFunctionRecord, isDriverCommandRecord, isEngineCommandRecord, isMyBreakpointsOn, isRecordProcessed, isRFSMCache, isRFSMOnly, issueActionFailure, issueActionOnXFailure, issueErrorPerformingAction, issueErrorPerformingActionOnX, issueErrorPerformingActionUsing, issueInputRecordFailure, issueInputRecordFailure, issuePassedSuccess, logFailureMessage, normalizeTestFileName, paramsFailedMsg, paramsFailedMsg, popTestRecord, processCustomProcessor, processSubclassProcessor, pushTestRecord, setAtEndOfProcess, setBreakpointsOn, setChainedProcessor, setClearProxiesAlways, setCommandLineBreakpoint, setCustomProcInstancePath, setLogUtilities, setMyBreakpointsOn, setParams, setProcInstance, setProcInstancePath, setRecordProcessed, setRFSMCache, setRFSMOnly, setSecsWaitForComponent, setSecsWaitForWindow, setTestDomains, setTestRecordData, setUnexpectedAlertBehaviour, setVariable, standardFailureMessage, substituteVariable, validateParamSize, validProcessorClassName
protected java.lang.String command
protected java.util.Iterator<java.lang.String> iterator
protected DDGUIUtilities utils
public boolean isSupportedRecordType(java.lang.String recordType)
isSupportedRecordType
in class Processor
recordType
- -- String text of record type to match (ignoring case).protected java.util.Collection interpretFields() throws SAFSException
Processor.testRecordData
fields are set from the inputRecord.
Processor.testRecordData
, the inputRecord field
Field #1: The DRIVER COMMAND record type (C).
Subsequent fields would be as follows (with a separator between each field):
Field: #2 #3 - N
============== ===============
COMMAND, [PARAMETER(S),]
SAFSException
public void process()
Processor
Thus, any subclassing Processor should attempt to process it's own commands and then invoke super.process() to try any chained Processor(s).
Otherwise, by default executes setRecordProcessed(false) if no chainedProcessor is present.
protected void init() throws SAFSException
SAFSException
protected void localProcess()
protected void commandProcess()
protected void issueGenericSuccess(java.lang.String comment, java.lang.String detail)
protected void issueGenericSuccessUsing(java.lang.String x, java.lang.String comment)
protected void issuePassedSuccess(java.lang.String comment)
protected void issueGenericSuccess(java.lang.String comment)
protected java.lang.String getStandardFailureDetail()
protected java.lang.String getStandardWarningDetail()
protected void issueActionWarning(java.lang.String warning)
Sets status to WARNING and issues a WARNING message. string warning is expected to already be localized.
protected void issueParameterCountFailure()
protected void issueParameterCountFailure(java.lang.String detail)
detail
- detail about specific missing params or command formatprotected void issueParameterValueFailure(java.lang.String paramName)
paramName
- -- the Name of the action parameter in error.protected void issueFileErrorFailure(java.lang.String filename)
protected void issueUnknownErrorFailure(java.lang.String cause)
protected void issueExecutionNegativeMessage(java.lang.String detail)
protected void issueActionUsingNegativeMessage(java.lang.String x, java.lang.String detail)
protected boolean checkGUIExistence(boolean expectedExist, java.lang.String mapNam, java.lang.String window, java.lang.String component, int timeoutInSeconds) throws SAFSException
expectedExist
- boolean, the expected existence of the window/component.mapNam
- String, the map namewindow
- String, the window's namecomponent
- String, the component's nametimeoutInSeconds
- int, the timeout in secondsSAFSException
- is thrown out if there is something wrong.onGUIGotoCommands(boolean)
Copyright © SAS Institute. All Rights Reserved.