public abstract class Processor extends java.lang.Object implements RuntimeDataInterface, ITestRecordStackable
Modifier and Type | Field and Description |
---|---|
protected static boolean |
breakpointsOn
All processor instances may enable/disable and force breakpoints where they
deem this appropriate.
|
static java.lang.String |
CASE_INSENSITIVE_FLAG |
static java.lang.String |
CASEINSENSITIVE_FLAG |
protected static boolean |
clearProxiesAlways |
protected static boolean |
commandLineBreakpoint |
protected static java.lang.String |
customStr |
protected static GetText |
customText |
protected static int |
DEBUG_MESSAGE
Convenience for local referencing instead of referencing AbstractLogFacility.
|
protected static java.lang.String |
debugStr |
protected static GetText |
debugText |
static java.lang.String |
DEFAULT_CUSTOM_PROCESSOR_PACKAGE |
static java.lang.String |
DEFAULT_CUSTOM_PROCESSOR_SUBPACKAGE |
static java.lang.String |
DEFAULT_PROCESSOR_PACKAGE
"org.safs"
Default package for Processor subclasses used to execute test data.
|
protected static int |
FAILED_MESSAGE
Log MessageType for local referencing.
|
protected static int |
FAILED_OK_MESSAGE
Log MessageType for local referencing.
|
protected static java.lang.String |
failedStr |
protected static GetText |
failedText |
protected static java.lang.String |
FAILURE_DETAIL
GetText.text() keyword.
|
protected static int |
GENERIC_MESSAGE
Convenience for local referencing instead of referencing AbstractLogFacility.
|
protected static java.lang.String |
genericStr |
protected static GetText |
genericText |
protected static java.lang.String |
LINE_FAILURE_4
GetText.text() keyword.
|
protected LogUtilities |
log |
protected boolean |
myBreakpointsOn
Individual processor instances may enable/disable and force breakpoints where they
deem this appropriate.
|
protected static java.lang.String |
otherStr |
protected static GetText |
otherText |
protected static java.lang.String |
PARAM_SIZE_1
GetText.text() keyword.
|
protected static java.lang.String |
PARAM_SIZE_2
GetText.text() keyword.
|
protected static java.lang.String |
PARAM_SIZE_3
GetText.text() keyword.
|
protected static java.lang.String |
PARAM_SIZE_4
GetText.text() keyword.
|
protected java.util.Collection |
params
Purpose: the collection of params Initialized: constructor |
protected static int |
PASSED_MESSAGE
Log MessageType for local referencing.
|
protected static java.lang.String |
passedStr |
protected static GetText |
passedText |
protected static java.lang.String |
PRE_TXT_SUCCESS_4
GetText.text() keyword.
|
protected static java.lang.String |
PRE_TXT_SUCCESS_5
GetText.text() keyword.
|
protected static boolean |
processorConfigSet |
protected java.util.Map |
processorMap
keeps instantiated processors for reuse
|
protected boolean |
recordProcessed
Status for whether the processor processed the record, if the processor
fails to support the record it has been given, then the processor should
set this to false, so that any processor chain can continue to the next
processor, if one is available.
|
static java.lang.String |
RECTYPE_DRIVER_COMMAND
"C" Record Type Constant
|
static java.lang.String |
RECTYPE_DRIVER_COMMAND_F
"CF" Record Type Constant
|
static java.lang.String |
RECTYPE_DRIVER_COMMAND_W
"CW" Record Type Constant
|
static java.lang.String |
RECTYPE_TEST_STEP
"T" Record Type Constant
|
static java.lang.String |
RECTYPE_TEST_STEP_F
"TF" Record Type Constant
|
static java.lang.String |
RECTYPE_TEST_STEP_W
"TW" Record Type Constant
|
protected static boolean |
RFSMCache |
protected static boolean |
RFSMOnly |
static java.lang.String |
RFT_FIND_SEARCH_MODE_ALGORITHM
"RFSMOnly"
|
static java.lang.String |
RFT_FIND_SEARCH_MODE_CACHE
"RFSMCache"
|
static java.lang.String |
SAFS_CLEARPROXIESALWAYS_ITEM
"clearProxiesAlways"
|
static java.lang.String |
SAFS_COMMANDLINEBREAKPOINT_ITEM
"commandLineBreakpoint"
|
static java.lang.String |
SAFS_COMMANDLINEBREAKPOINT_VARIABLE
"safs.commandLineBreakpoint"
|
static java.lang.String |
SAFS_PARAMS_FILE
"safsparams.dat"
|
static java.lang.String |
SAFS_RESBUN_NAME |
static java.lang.String |
SAFS_SECSWAITFORCOMPONENT_ITEM
"secsWaitForComponent"
|
static java.lang.String |
SAFS_SECSWAITFORCOMPONENT_VARIABLE
"safs.secsWaitForComponent"
|
static java.lang.String |
SAFS_SECSWAITFORWINDOW_ITEM
"secsWaitForWindow"
|
static java.lang.String |
SAFS_SECSWAITFORWINDOW_VARIABLE
"safs.secsWaitForWindow"
|
static java.lang.String |
SAFS_TESTDOMAINS_ITEM
"testDomains"
Config setting should contain semi-colon delimited combinations of values:
Java;Html;Net;Win
|
static java.lang.String |
SAFS_TESTDOMAINS_VARIABLE
"safs.testDomains"
|
protected static int |
secsWaitForComponent |
protected static int |
secsWaitForWindow |
protected static java.lang.String |
SENT_MSG_3
GetText.text() keyword.
|
protected static java.lang.String |
testDomains |
protected TestRecordHelper |
testRecordData
Purpose: holds the testRecordData info Initialized: constructor |
protected ITestRecordStackable |
testrecordStackable
The ITestRecordStackable used to store 'Test Record' in a FILO.
|
protected static java.lang.String |
TXT_FAILURE_1
GetText.text() keyword.
|
protected static java.lang.String |
TXT_FAILURE_2
GetText.text() keyword.
|
protected static java.lang.String |
TXT_FAILURE_3
GetText.text() keyword.
|
protected static java.lang.String |
TXT_FAILURE_4
GetText.text() keyword.
|
protected static java.lang.String |
TXT_FAILURE_5
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_1
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_2
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_2a
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_3
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_3a
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_4
GetText.text() keyword.
|
protected static java.lang.String |
TXT_SUCCESS_5
GetText.text() keyword.
|
protected static java.lang.String |
unexpectedAlertBehaviour
How to handle the 'alert dialog' if it is visible unexpectedly, it could be set as 'accept' or 'dismiss' or 'ignore'
|
protected static int |
WARNING_MESSAGE
Log MessageType for local referencing.
|
protected static int |
WARNING_OK_MESSAGE
Log MessageType for local referencing.
|
protected static java.lang.String |
warningStr |
protected static GetText |
warningText |
Constructor and Description |
---|
Processor()
Purpose: constructor |
Modifier and Type | Method and Description |
---|---|
protected static void |
activateBreakpoint(java.lang.String breakpoint_message)
Activate the SAFSBreakpointException breakpoint.
|
protected static void |
checkBreakpoints(java.lang.String breakpoint_message)
test for enabled breakpoints and active a breakpoint if enabled.
|
protected void |
checkMyBreakpoints(java.lang.String breakpoint_message)
test for enabled breakpoints and active a breakpoint if enabled.
|
protected java.io.File |
deduceBenchFile(java.lang.String filename)
Deduce the absolute full path bench-relative file.
|
protected java.io.File |
deduceDiffFile(java.lang.String filename)
Deduce the absolute full path Diff-relative file.
|
protected java.io.File |
deduceProjectFile(java.lang.String filename)
Deduce the absolute full path to a project-relative file.
|
protected java.io.File |
deduceTestFile(java.lang.String filename)
Deduce the absolute full path test-relative file.
|
protected boolean |
delay(int millisec) |
void |
distributeConfigInformation() |
protected java.lang.String |
getAbsolutFileName(java.lang.String filename,
java.lang.String directory) |
java.util.Collection |
getAlternateParams() |
java.lang.String |
getAppMapItem(java.lang.String appMapID,
java.lang.String section,
java.lang.String item)
Retrieve the resolved value of an item stored in the App Map chain (SAFSMAPS).
|
Processor |
getChainedProcessor()
Returns chained processor to interpret test data, if any.
|
protected Processor |
getClassInstance(java.lang.String classname)
Instance a given Processor from the provided classname.
|
static boolean |
getClearProxiesAlways() |
protected java.util.ArrayList |
getCustomProcClassNames()
Attempts to locate a class for the current customProcInstancePath.
|
java.lang.String |
getCustomProcInstancePath()
Return the current customProcInstancePath setting.
|
LogUtilities |
getLogUtilities() |
java.util.Collection |
getParams() |
protected java.util.ArrayList |
getProcClassNames()
Attempts to locate a class for the current procInstancePath.
|
Processor |
getProcInstance()
Return/Create an instance of the actual processor used to interpret test data.
|
java.lang.String |
getProcInstancePath()
Return the current procInstancePath setting.
|
protected boolean |
getRequiredField(int findex,
java.lang.String fname,
java.lang.String fvalue)
Retrieve a non-empty field value from the testRecordData inputrecord.
|
static int |
getSecsWaitForComponent() |
static int |
getSecsWaitForWindow() |
protected java.lang.String |
getStandardErrorMessage(java.lang.String failure)
Retrieve the standard "SOMETHING failure in filename FILENAME at line LINENUMBER" message.
|
TestRecordHelper |
getTestRecordData() |
static java.lang.String |
getUnexpectedAlertBehaviour()
Get how the 'alert dialog' will be handled if it is visible unexpectedly.
|
java.lang.String |
getVariable(java.lang.String var)
Retrieve the current runtime value of the global variable (SAFSVARS).
|
boolean |
hasChainedProcessor()
True if this processor has an instance of a chained processor to
interpret test data if this one does not succeed in processing the data.
|
protected boolean |
initProcessorAndProcess(Processor aprocessor,
java.util.Collection params)
Init the processor and process a record
Initializes the processor by passing it the currently active LogUtilities,
TestRecordHelper, and extracted record parameters.
|
protected boolean |
instanceProcessorAndProcess(java.lang.String instanceName,
java.util.Collection params)
Tries to instance a processor and then process a record.
|
static boolean |
isBreakpointsOn()
test if breakpoints is enabled.
|
static boolean |
isComponentFunctionRecord(java.lang.String recordType)
Convenience routine for isSupportedRecordType to return true if
the Processor supports standard Component Function records.
|
static boolean |
isDriverCommandRecord(java.lang.String recordType)
Convenience routine for isSupportedRecordType to return true if
the Processor supports standard Driver Command records.
|
boolean |
isEngineCommandRecord(java.lang.String recordType)
Convenience routine for isSupportedRecordType to return true if
the Processor supports standard Engine Command records.
|
boolean |
isMyBreakpointsOn()
test if breakpoints is enabled.
|
boolean |
isRecordProcessed() |
static boolean |
isRFSMCache() |
static boolean |
isRFSMOnly() |
protected void |
issueActionFailure(java.lang.String error)
Unable to perform [action].
|
protected void |
issueActionOnXFailure(java.lang.String x,
java.lang.String error)
Unable to perform [action].
|
protected void |
issueErrorPerformingAction(java.lang.String error)
"Error performing [action]."
"Error at line [number] in file [file]: [error]" |
protected void |
issueErrorPerformingActionOnX(java.lang.String x,
java.lang.String error)
"Error performing [action] on [x]."
"Error at line [number] in file [file]: [error]" |
protected void |
issueErrorPerformingActionUsing(java.lang.String x,
java.lang.String error)
"[action] was not successful using [x]."
"Error at line [number] in file [file]: [error]" |
protected void |
issueInputRecordFailure(java.lang.String error)
Unable to perform [action].
|
protected void |
issueInputRecordFailure(java.lang.String message,
java.lang.String error)
If [message]==null
Unable to perform [action]. |
protected void |
issuePassedSuccess(java.lang.String message,
java.lang.String detail)
issue OK status and PASSED message.
If [message]==null [action] successful. [detail] If [message]!=null [message] [detail] string comment is expected to already be localized, but can be null. |
abstract boolean |
isSupportedRecordType(java.lang.String recordType)
Determine support for a particular record type.
|
protected void |
logFailureMessage(java.lang.String aborttext,
java.lang.String details,
java.lang.String error)
Write failure to log.
Write failure to debug log. |
protected java.lang.String |
normalizeTestFileName(java.lang.String filename)
Deprecated.
use
deduceTestFile(String) instead |
protected void |
paramsFailedMsg()
Purpose: log a FAILED_MESSAGE about the wrong number of parameters; this version is used by DriverCommands |
protected void |
paramsFailedMsg(java.lang.String windowName,
java.lang.String compName)
Purpose: log a FAILED_MESSAGE about the wrong number of parameters |
TestRecordData |
popTestRecord()
Retrieve the Test-Record from the the Stack after the execution of a keyword.
|
void |
process()
The primary method that all subclasses must implement.
|
protected boolean |
processCustomProcessor(java.util.Collection params) |
protected boolean |
processSubclassProcessor(java.util.Collection params) |
void |
pushTestRecord(TestRecordData trd)
Push the current 'test record' into the Stack before the execution of a keyword.
|
protected void |
setAtEndOfProcess(int statusCode,
java.lang.String message,
java.lang.String detail)
At the end of processing a test-record, this method could be called to set the
test-record's status code, and write the message to the Test Log.
Currently, for StatusCodes.NO_SCRIPT_FAILURE , it calls issuePassedSuccess(String, String)
StatusCodes.GENERAL_SCRIPT_FAILURE , it calls issueInputRecordFailure(String, String)
Other status code, it simply writes a generic message to the test log. |
static void |
setBreakpointsOn(boolean enabled)
This may be set by any means.
|
void |
setChainedProcessor(Processor aprocessor)
Set the instance of the chained processor to interpret test data if this
one does not succeed in processing the data.
|
static void |
setClearProxiesAlways(boolean enabled) |
static void |
setCommandLineBreakpoint(boolean enabled) |
void |
setCustomProcInstancePath(java.lang.String pkgname)
Change the procInstancePath setting.
|
void |
setLogUtilities(LogUtilities log) |
void |
setMyBreakpointsOn(boolean enabled)
This may be set by any means.
|
void |
setParams(java.util.Collection params) |
void |
setProcInstance(Processor aprocessor)
Provide a Processor object to interpret test data.
|
void |
setProcInstancePath(java.lang.String pkgname)
Change the procInstancePath setting.
|
void |
setRecordProcessed(boolean processed) |
static void |
setRFSMCache(boolean enable) |
static void |
setRFSMOnly(boolean enable) |
static void |
setSecsWaitForComponent(int secs) |
static void |
setSecsWaitForWindow(int secs) |
static void |
setTestDomains(java.lang.String domains) |
void |
setTestRecordData(TestRecordHelper testRecordData) |
static void |
setUnexpectedAlertBehaviour(java.lang.String behaviour)
Set how to handle the 'alert dialog' if it is visible unexpectedly.
|
boolean |
setVariable(java.lang.String var,
java.lang.String val)
Set a new runtime value of a global variable (SAFSVARS).
|
protected void |
standardFailureMessage(java.lang.String failure,
java.lang.String detail)
log the more standard FAILED_MESSAGE with detail.
|
java.lang.String |
substituteVariable(java.lang.String str)
Purpose: if leading ^ found, then substitute variable. |
protected boolean |
validateParamSize(int minparams)
check if params.size() < minparams
If params.size() is insufficient we set testRecordData.setStatusCode to GENERAL_SCRIPT_FAILURE
and log a paramsFailedMsg and return 'false'.
|
protected boolean |
validProcessorClassName(java.lang.String classname)
Validate that a given classname is valid and assignable to org.safs.Processor
|
public static final java.lang.String DEFAULT_PROCESSOR_PACKAGE
public static final java.lang.String DEFAULT_CUSTOM_PROCESSOR_PACKAGE
public static final java.lang.String DEFAULT_CUSTOM_PROCESSOR_SUBPACKAGE
public static final java.lang.String CASEINSENSITIVE_FLAG
public static final java.lang.String CASE_INSENSITIVE_FLAG
protected ITestRecordStackable testrecordStackable
protected static boolean breakpointsOn
protected boolean myBreakpointsOn
protected static final java.lang.String TXT_SUCCESS_1
protected static final java.lang.String TXT_SUCCESS_2
protected static final java.lang.String TXT_SUCCESS_2a
protected static final java.lang.String TXT_SUCCESS_3
protected static final java.lang.String TXT_SUCCESS_3a
protected static final java.lang.String TXT_SUCCESS_4
protected static final java.lang.String PRE_TXT_SUCCESS_4
protected static final java.lang.String TXT_SUCCESS_5
protected static final java.lang.String PRE_TXT_SUCCESS_5
protected static final java.lang.String SENT_MSG_3
protected static final java.lang.String TXT_FAILURE_1
protected static final java.lang.String TXT_FAILURE_2
protected static final java.lang.String TXT_FAILURE_3
protected static final java.lang.String TXT_FAILURE_4
protected static final java.lang.String LINE_FAILURE_4
protected static final java.lang.String TXT_FAILURE_5
protected static final java.lang.String FAILURE_DETAIL
protected static final java.lang.String PARAM_SIZE_1
protected static final java.lang.String PARAM_SIZE_2
protected static final java.lang.String PARAM_SIZE_3
protected static final java.lang.String PARAM_SIZE_4
public static final java.lang.String RECTYPE_DRIVER_COMMAND
public static final java.lang.String RECTYPE_DRIVER_COMMAND_W
public static final java.lang.String RECTYPE_DRIVER_COMMAND_F
public static final java.lang.String RECTYPE_TEST_STEP
public static final java.lang.String RECTYPE_TEST_STEP_W
public static final java.lang.String RECTYPE_TEST_STEP_F
protected static final int DEBUG_MESSAGE
protected static final int GENERIC_MESSAGE
protected static final int FAILED_MESSAGE
protected static final int FAILED_OK_MESSAGE
protected static final int PASSED_MESSAGE
protected static final int WARNING_MESSAGE
protected static final int WARNING_OK_MESSAGE
protected TestRecordHelper testRecordData
protected LogUtilities log
public static final java.lang.String SAFS_RESBUN_NAME
protected static final java.lang.String genericStr
protected static final java.lang.String passedStr
protected static final java.lang.String failedStr
protected static final java.lang.String warningStr
protected static final java.lang.String otherStr
protected static final java.lang.String customStr
protected static final java.lang.String debugStr
protected static GetText genericText
protected static GetText passedText
protected static GetText failedText
protected static GetText warningText
protected static GetText otherText
protected static GetText customText
protected static GetText debugText
protected java.util.Collection params
protected java.util.Map processorMap
protected boolean recordProcessed
protected static int secsWaitForWindow
protected static int secsWaitForComponent
protected static boolean commandLineBreakpoint
protected static java.lang.String testDomains
protected static boolean clearProxiesAlways
protected static boolean RFSMOnly
protected static boolean RFSMCache
protected static java.lang.String unexpectedAlertBehaviour
public static final java.lang.String SAFS_PARAMS_FILE
public static final java.lang.String SAFS_CLEARPROXIESALWAYS_ITEM
public static final java.lang.String SAFS_TESTDOMAINS_ITEM
public static final java.lang.String SAFS_SECSWAITFORWINDOW_ITEM
public static final java.lang.String SAFS_SECSWAITFORCOMPONENT_ITEM
public static final java.lang.String SAFS_COMMANDLINEBREAKPOINT_ITEM
public static final java.lang.String SAFS_SECSWAITFORWINDOW_VARIABLE
public static final java.lang.String SAFS_SECSWAITFORCOMPONENT_VARIABLE
public static final java.lang.String SAFS_COMMANDLINEBREAKPOINT_VARIABLE
public static final java.lang.String SAFS_TESTDOMAINS_VARIABLE
protected static boolean processorConfigSet
public static final java.lang.String RFT_FIND_SEARCH_MODE_ALGORITHM
public static final java.lang.String RFT_FIND_SEARCH_MODE_CACHE
protected Processor getClassInstance(java.lang.String classname)
classname
- should not be null or 0 lengthprotected boolean validProcessorClassName(java.lang.String classname)
protected java.util.ArrayList getProcClassNames()
Subclasses should override this method to return additional classnames that are based off a root package name stored in procInstancePath.
Use validProcessorClassName before adding a classname to the list.
protected java.util.ArrayList getCustomProcClassNames()
Subclasses, however, can also override this method to return specific classnames that are based off a root package name stored in customProcInstancePath.
Use validProcessorClassName before adding a classname to the list.
public Processor getProcInstance()
public void setProcInstance(Processor aprocessor)
public boolean hasChainedProcessor()
public Processor getChainedProcessor()
public void setChainedProcessor(Processor aprocessor)
For example, we may store an org.safs.DriverCommandProcessor object to provide default handling of Driver Command records not overridden by some subclass.
Can be set to null to remove any existing chainedProcessor.
public java.lang.String getProcInstancePath()
public void setProcInstancePath(java.lang.String pkgname)
public java.lang.String getCustomProcInstancePath()
public void setCustomProcInstancePath(java.lang.String pkgname)
public static void setBreakpointsOn(boolean enabled)
public static boolean isBreakpointsOn()
protected static void checkBreakpoints(java.lang.String breakpoint_message)
protected static void activateBreakpoint(java.lang.String breakpoint_message)
public void setMyBreakpointsOn(boolean enabled)
public boolean isMyBreakpointsOn()
protected void checkMyBreakpoints(java.lang.String breakpoint_message)
public TestRecordHelper getTestRecordData()
public void setTestRecordData(TestRecordHelper testRecordData)
public LogUtilities getLogUtilities()
public void setLogUtilities(LogUtilities log)
public java.util.Collection getParams()
public void setParams(java.util.Collection params)
public java.util.Collection getAlternateParams()
public boolean isRecordProcessed()
public void setRecordProcessed(boolean processed)
protected boolean instanceProcessorAndProcess(java.lang.String instanceName, java.util.Collection params)
instanceName
- String, the processor class nameparams
- Collection, the parameterspublic void distributeConfigInformation()
protected boolean initProcessorAndProcess(Processor aprocessor, java.util.Collection params)
aprocessor,
- Processorparams,
- Collectionprotected boolean delay(int millisec)
public boolean setVariable(java.lang.String var, java.lang.String val) throws SAFSException
RuntimeDataInterface
setVariable
in interface RuntimeDataInterface
var
- -- Variable names are NOT case-sensitive.val
- -- value to set. Can be an empty string.SAFSException
public java.lang.String getVariable(java.lang.String var) throws SAFSException
RuntimeDataInterface
getVariable
in interface RuntimeDataInterface
var
- -- Variable names are NOT case-sensitive.SAFSException
public java.lang.String getAppMapItem(java.lang.String appMapID, java.lang.String section, java.lang.String item)
RuntimeDataInterface
getAppMapItem
in interface RuntimeDataInterface
appMapID
- -- can be null to get from the "default/current" app map.section
- -- section names are NOT case-sensitive.item
- -- item names are NOT case-sensitive.public java.lang.String substituteVariable(java.lang.String str)
str,
- String string to search for ^ at beginningprotected boolean processSubclassProcessor(java.util.Collection params)
protected boolean processCustomProcessor(java.util.Collection params)
public void process()
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.
public abstract boolean isSupportedRecordType(java.lang.String recordType)
recordType
- -- String text of record type to match (ignoring case).public static boolean isDriverCommandRecord(java.lang.String recordType)
public static boolean isComponentFunctionRecord(java.lang.String recordType)
public boolean isEngineCommandRecord(java.lang.String recordType)
protected void paramsFailedMsg() throws SAFSException
SAFSException
protected void paramsFailedMsg(java.lang.String windowName, java.lang.String compName) throws SAFSException
windowName,
- StringcompName,
- StringSAFSException
protected boolean validateParamSize(int minparams)
minparams
- - minimum number of parameters required for processingprotected java.lang.String getAbsolutFileName(java.lang.String filename, java.lang.String directory)
filename
- A file namedirectory
- This is a variable assigned in STAF system. It can be one of following:
1. STAFHelper.SAFS_VAR_BENCHDIRECTORY
2. STAFHelper.SAFS_VAR_DATAPOOLDIRECTORY
3. STAFHelper.SAFS_VAR_DIFDIRECTORY
4. STAFHelper.SAFS_VAR_LOGSDIRECTORY
5. STAFHelper.SAFS_VAR_PROJECTDIRECTORY
6. STAFHelper.SAFS_VAR_TESTDIRECTORY@Deprecated protected java.lang.String normalizeTestFileName(java.lang.String filename)
deduceTestFile(String)
insteadSTAFHelper.SAFS_VAR_TESTDIRECTORY
as parent folder.filename
- String, a file name. Can be relative or absolute.protected boolean getRequiredField(int findex, java.lang.String fname, java.lang.String fvalue)
findex
- - 0-based index of field to extract from input record.fname
- - field name to use in issuing any Invalid Parameter error messages.fvalue
- - String to receive the desired field value on success.protected java.lang.String getStandardErrorMessage(java.lang.String failure)
failure
- -- text to appear before the filename and line number info.protected void standardFailureMessage(java.lang.String failure, java.lang.String detail)
failure
- -- the failure text that precedes the 'failure in filename' message.detail
- -- the detail that will be used unmodified.public static void setSecsWaitForWindow(int secs)
public static int getSecsWaitForWindow()
public static void setSecsWaitForComponent(int secs)
public static int getSecsWaitForComponent()
public static void setCommandLineBreakpoint(boolean enabled)
public static void setTestDomains(java.lang.String domains)
public static void setClearProxiesAlways(boolean enabled)
public static boolean getClearProxiesAlways()
public static void setRFSMOnly(boolean enable)
public static boolean isRFSMOnly()
public static void setRFSMCache(boolean enable)
public static boolean isRFSMCache()
public static java.lang.String getUnexpectedAlertBehaviour()
public static void setUnexpectedAlertBehaviour(java.lang.String behaviour)
behaviour
- String, it could be set as 'accept' or 'dismiss' or 'ignore'.protected java.io.File deduceTestFile(java.lang.String filename) throws SAFSException
filename,
- String, the test/actual file name. If there are any File.separators in the
relative path then the path is actually considered relative to the Datapool
directory unless it does not exist, or is already an absolute file path.
If a relative directory path does not exist relative to the Datapool directory then the final path will be relative to the Project directory.
If it is an absolute path, and contains a root path that includes the Bench directory, then the file will be converted to a comparable relative path off the Test directory.
SAFSException
FileUtilities.deduceFile(String, int, RuntimeDataInterface)
protected java.io.File deduceDiffFile(java.lang.String filename) throws SAFSException
filename,
- String, the diff file name. If there are any File.separators in the
relative path then the path is actually considered relative to the Datapool
directory unless it does not exist, or is already an absolute file path.
If a relative directory path does not exist relative to the Datapool directory then the final path will be relative to the Project directory.
If it is an absolute path, and contains a root path that includes the Bench directory, then the file will be converted to a comparable relative path off the Diff directory.
SAFSException
FileUtilities.deduceFile(String, int, RuntimeDataInterface)
protected java.io.File deduceBenchFile(java.lang.String filename) throws SAFSException
filename,
- String, the test file name. If there are any File.separators in the
relative path then the path is actually considered relative to the Datapool
directory unless it does not exist, or is already an absolute file path.
If a relative directory path does not exist relative to the Datapool directory then
the final path will be relative to the Project directory.SAFSException
FileUtilities.deduceFile(String, int, RuntimeDataInterface)
protected java.io.File deduceProjectFile(java.lang.String filename) throws SAFSException
filename,
- String, the test file name. The path is ALWAYS considered relative
to the project root directory regardless of the absence or presence of File.separators
unless the file is already an absolute path.SAFSException
FileUtilities.deduceFile(String, int, RuntimeDataInterface)
protected void logFailureMessage(java.lang.String aborttext, java.lang.String details, java.lang.String error)
aborttext
- String, the abort messagedetails
- String, the detail failure messageerror
- String, the error messageprotected void issueInputRecordFailure(java.lang.String error)
Sets status to FAILURE and issues a FAILED message. called by other issueFailure routines
protected void issueInputRecordFailure(java.lang.String message, java.lang.String error)
Sets status to FAILURE and issues a FAILED message. called by other issueFailure routines
protected void issuePassedSuccess(java.lang.String message, java.lang.String detail)
protected void setAtEndOfProcess(int statusCode, java.lang.String message, java.lang.String detail)
StatusCodes.NO_SCRIPT_FAILURE
, it calls issuePassedSuccess(String, String)
StatusCodes.GENERAL_SCRIPT_FAILURE
, it calls issueInputRecordFailure(String, String)
statusCode
- int, the status code to set to test-record.message
- String, the message to write to the Test Log.
If it is null, then the default message will be used.detail
- String, the detail message to write to the Test Log.
If it is null, then the default detail message will be used.issueInputRecordFailure(String, String)
,
issuePassedSuccess(String, String)
protected void issueActionFailure(java.lang.String error)
Sets status to FAILURE and issues a FAILED message. called by other issueFailure routines
protected void issueActionOnXFailure(java.lang.String x, java.lang.String error)
Sets status to FAILURE and issues a FAILED message.
protected void issueErrorPerformingAction(java.lang.String error)
protected void issueErrorPerformingActionOnX(java.lang.String x, java.lang.String error)
protected void issueErrorPerformingActionUsing(java.lang.String x, java.lang.String error)
public void pushTestRecord(TestRecordData trd)
Push the current 'test record' into the Stack before the execution of a keyword. This should be called after the 'test record' is properly set.
pushTestRecord
in interface ITestRecordStackable
trd
- TestRecordData, the test record to push into a stackpopTestRecord()
public TestRecordData popTestRecord()
After execution of a keyword, pop the test record from Stack and return is as the result. Replace the class field 'Test Record' by that popped from the stack if they are not same.
popTestRecord
in interface ITestRecordStackable
pushTestRecord(TestRecordData)
Copyright © SAS Institute. All Rights Reserved.