public class SAFSQTP extends GenericEngine
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 QTP supported config file items:
[SAFS_QTP] AUTOLAUNCH=FALSE Defaults to FALSE because config info must be valid. HOOK=C:\PathTo\AnyAOM.VBS (QTP Automation Object Model startup via WSH cscript.exe) ;HOOK=C:\PathTo\AnyExecutable.EXT (Alternate method of starting like via a .BAT file) ;TIMEOUT=45 (Timeout in seconds before issuing autolaunch failure)
Note: The HOOK item can be a VBS script that will be used as an argument to the CSCRIPT.EXE executable for Windows Script Host. This script is intended to use the QTP Automation Object Model to prepare and then launch QTP as desired by the tester.
The HOOK item can also be a valid full path to any other executable -- like a batch file (.BAT). The value of HOOK in this case will be used "as is". The Java Runtime.exec function will attempt to launch this, so whatever limitations placed by the Runtime.exec from Java apply. Mostly this may only be an issue if spaces or tabs exist in the string.
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 NOV 18, 2005 Modified CScript launch command for VBScript.
@author Carl Nagle DEC 14, 2005 Refactored with DriverConfiguredSTAFInterface superclass
ProcessConsole
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENGINE_DESCRIPTION
'The engine using 'Mercury QuickTest Pro' to test GUI.'
|
(package private) static java.lang.String |
ENGINE_NAME
"SAFS/QTP" -- The name of this engine as registered with STAF.
|
static java.lang.String |
ENGINE_VERSION
'5.5'
|
(package private) static java.lang.String |
TIMEOUT_OPTION |
console, description, process, productName, testRecordData, testrecordStackable, version
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 |
---|
SAFSQTP()
Constructor for QTP.
|
SAFSQTP(DriverInterface driver)
PREFERRED Constructor for SAFSQTP.
|
Modifier and Type | Method and Description |
---|---|
void |
launchInterface(java.lang.Object configInfo)
Extracts configuration information and launches QTP initialization script
in a new process.
|
long |
processRecord(TestRecordHelper testRecordData)
Override superclass to catch unsuccessful initialization scenarios.
|
deduceBenchFile, deduceProjectFile, deduceTestFile, getAppMapItem, getDescription, getEngineName, getProductName, getVariable, getVersion, isToolRunning, logMessage, makeQuotedPath, makeQuotedString, popTestRecord, postShutdownServiceDelay, pushTestRecord, reset, resetShutdownSemaphore, saveTestRecordScreenToTestDirectory, setDescription, setProductName, setTRDStatus, setVariable, setVersion, shutdownService, waitHookShutdownAndReset
configureJSTAFServiceEmbeddedJVMOption, extendedGenericMessage, finalize, getCoreInterface, getEmbedded64JVMBinPath, 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
public static final java.lang.String ENGINE_VERSION
public static final java.lang.String ENGINE_DESCRIPTION
static final java.lang.String TIMEOUT_OPTION
public SAFSQTP()
public SAFSQTP(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.