public class SAFSIOS extends GenericEngine
This is intended for testing of iPhone and iPad iOS applications.
The default SAFSDRIVER Tool-Independent Driver (TID) does not provide for any command-line options to configure the Engine. All configuration information must be provided in config files. By default, these are SAFSTID.INI files. See SAFSTID Config Files for more information.
The IOS supported config file items are listed below. Remember, this engine executes on a Mac, so all file paths are in Unix/Mac format:
[SAFS_IOS] AUTOLAUNCH=FALSE (Defaults to FALSE because config info must be valid.) Project=/Library/SAFS/samples/UICatalog/ (IOS Automation Project Location) Template="UICatalogInstruments.tracetemplate" (Instruments tracetemplate for Application) ;HOOK=org.safs.ios.JavaHook (Java SAFS Engine Class) ;TIMEOUT=30 (Alternate AutoLaunch timeout value in seconds) ;STAFID="SAFS/IOS" (Normally never used.) ;JVM=JVMpath (Full path to desired Java executable if "java" is not sufficient.) ;JVMARGS=JVM Args (Ex: "-Xms512m -Xmx512m", will be used unmodified.) ;CLASSPATH=altClasspath (Generally overrides system classpath.) ;XBOOTCLASSPATH=<CLASSPATH> (CLASSPATH needed for rare cases. Normally never used.) ;ConvertSAFSInputKeysSyntax=ON|OFF (ON to use SAFS InputKeys syntax in Test Complete)
We do use a ProcessConsole to keep the Process in, out, and err streams from filling up.
Runtime.exec
Runtime.exec Process
@author Carl Nagle JUN 30, 2011 Original Release
ProcessConsole
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
AUTOLAUNCH_OPTION |
(package private) static int |
DEFAULT_INIT_TIMEOUT |
(package private) static java.lang.String |
ENGINE_NAME
"SAFS/IOS" -- The name of this engine as registered with STAF.
|
(package private) static java.lang.String |
HOOK_CLASS
"org.safs.ios.JavaHook"
|
(package private) static java.lang.String |
HOOK_OPTION |
(package private) static java.lang.String |
JVM_OPTION |
(package private) static java.lang.String |
JVMARGS_OPTION |
(package private) static java.lang.String |
PROJECT_OPTION |
(package private) static java.lang.String |
TEMPLATE_OPTION |
(package private) static java.lang.String |
TIMEOUT_OPTION |
(package private) static java.lang.String |
XBOOTCLASSPATH_OPTION |
console, process, testRecordData, testrecordStackable
config, customStr, customText, debugStr, debugText, driver, DRIVER_TEMP_PROCESS, failedStr, failedText, genericStr, genericText, launchCount, log, machine, otherStr, otherText, passedStr, passedText, processName, running, SAFS_RESBUN_NAME, servicename, shutdownCount, staf, STAFPROC_EXE, warningStr, warningText, weStartedService, weStartedSTAF
COMMAND_SHUTDOWN_HOOK
Constructor and Description |
---|
SAFSIOS()
Constructor for IOS.
|
SAFSIOS(DriverInterface driver)
PREFERRED Constructor for SAFSIOS.
|
Modifier and Type | Method and Description |
---|---|
void |
launchInterface(java.lang.Object configInfo)
Extracts configuration information and launches IOS initialization in a new process.
|
long |
processRecord(TestRecordHelper testRecordData)
Override superclass to catch unsuccessful initialization scenarios.
|
deduceBenchFile, deduceProjectFile, deduceTestFile, getAppMapItem, getEngineName, getVariable, isToolRunning, logMessage, makeQuotedPath, makeQuotedString, popTestRecord, postShutdownServiceDelay, pushTestRecord, reset, resetShutdownSemaphore, saveTestRecordScreenToTestDirectory, setTRDStatus, setVariable, shutdownService, waitHookShutdownAndReset
configureJSTAFServiceEmbeddedJVMOption, extendedGenericMessage, finalize, getCoreInterface, getEmbeddedJVMBinPath, getSTAFHelper, logMessage, setLogUtilities, setLogUtilities, shutdown, simpleGenericMessage, simpleGenericSuccessMessage, simpleGenericWarningMessage, simpleSuccessMessage, simpleSuccessMessage, simpleSuccessUsingMessage, standardErrorMessage, waitForServiceStartCompletion
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCoreInterface, shutdown
static final java.lang.String ENGINE_NAME
static final java.lang.String HOOK_CLASS
static final java.lang.String AUTOLAUNCH_OPTION
static final java.lang.String HOOK_OPTION
static final java.lang.String PROJECT_OPTION
static final java.lang.String TEMPLATE_OPTION
static final java.lang.String JVM_OPTION
static final java.lang.String JVMARGS_OPTION
static final java.lang.String XBOOTCLASSPATH_OPTION
static final java.lang.String TIMEOUT_OPTION
static final int DEFAULT_INIT_TIMEOUT
public SAFSIOS()
public SAFSIOS(DriverInterface driver)
public void launchInterface(java.lang.Object configInfo)
launchInterface
in interface ConfigurableToolsInterface
launchInterface
in class GenericEngine
configInfo
- can be whatever the final implementation needs it to be. This
might be a String with configuration information, the name of a class, or an instance
of some object used to provide configuration assets.GenericEngine.launchInterface(Object)
public long processRecord(TestRecordHelper testRecordData)
processRecord
in interface EngineInterface
processRecord
in class GenericEngine
EngineInterface#processRecord()
Copyright © SAS Institute. All Rights Reserved.