public class SAFSTC 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 TC supported config file items:
[SAFS_TC] AUTOLAUNCH=FALSE Defaults to FALSE because config info must be valid. HOOK=C:\SAFS\TCAFS\TCAFS.VBS (TC Automation Object Model startup via WSH cscript.exe) ;HOOK=C:\PathTo\AnyExecutable.EXT (Alternate method of starting like via a .BAT file) ;TIMEOUT=45 (Alternate AutoLaunch timeout value in seconds) ;SuiteName="C:\SAFS\TCAFS\TCAFS.pjs" (Alternate project suite to use instead of default TCAFS.pjs) ;ProjectName="TCAFS" (Alternate project to use instead of default TCAFS) ;ScriptName="StepDriver" (Alternate script to use instead of default StepDriver) ;OPTIONS="/customArg:value /Another" (Optional passthru args to go to TC scripts needing them) ;ConvertSAFSInputKeysSyntax=ON|OFF (ON to use SAFS InputKeys syntax in Test Complete)
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 TC Automation Object Model to prepare and then launch TC 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
@author JCRUNK AUG 01, 2006 Modified CScript launch command for VBScript.
@author Carl Nagle MAR 18, 2011 Accept additional TC/VBS INI command-line parameters
@author Lei Wang JAN 18, 2012 Modify to receive the console log messages from TC through STAF-Queue
ProcessConsole
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
CONSOLE_MSG_QUEUE_NAME
"SAFS/TC/CONSOLEMSG" -- The name of the handle registered with STAF,
we use this handle's queue to receive TC's console message.
|
(package private) static java.lang.String |
CONSOLE_MSG_SEPARATOR
CONSOLE_MSG_SEPARATOR is the separator defined in LogUtilities_X.SVB
From Test Complete, we combine the message and description by this separator,
and sent the whole message to the queue CONSOLE_MSG_QUEUE_NAME.
|
(package private) static java.lang.String |
ENGINE_NAME
"SAFS/TC" -- The name of this engine as registered with STAF.
|
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 |
---|
SAFSTC()
Constructor for TC.
|
SAFSTC(DriverInterface driver)
PREFERRED Constructor for SAFSTC.
|
Modifier and Type | Method and Description |
---|---|
void |
launchInterface(java.lang.Object configInfo)
Extracts configuration information and launches TC initialization script
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 CONSOLE_MSG_QUEUE_NAME
static final java.lang.String CONSOLE_MSG_SEPARATOR
public SAFSTC()
public SAFSTC(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.