org.safs.tools.drivers
Class SAFSDRIVER

java.lang.Object
  extended by org.safs.tools.drivers.AbstractDriver
      extended by org.safs.tools.drivers.DefaultDriver
          extended by org.safs.tools.drivers.SAFSDRIVER
All Implemented Interfaces:
DriverInterface, PathInterface
Direct Known Subclasses:
SAFSABBOTTest, SAFSDRIVERCOMMANDSTest, SAFSINPUTTest, SAFSLOGSTest, SAFSMAPSTest, SAFSROBOTJTest, SAFSVARSTest

public class SAFSDRIVER
extends DefaultDriver

SAFSDRIVER is the default, completed implementation of our abstract DefaultDriver.

This class is intended to be executed as a standalone Java application--typically, in its own JVM. The main() entry point will instance a new SAFSDRIVER and immediately invoke run().

Command-line Options and Configuration File Options are linked below.

The default name of configuration files is "SAFSTID.INI". There is a hierarchy of configuration files that will be sought based on command-line parameters provided. This hierarchy is summarized in the Configuration File Options doc linked below and detailed below::

  1. command-line specified PROJECT config file
    a project or test-specific config file, other than SAFSTID.INI, containing config information intended to override settings in the SAFSTID.INI file located in the PROJECT ROOT directory.

  2. default PROJECT config file
    SAFSTID.INI located in the PROJECT ROOT directory. The PROJECT ROOT would normally be provided as a command-line parameter. It may instead be provided in the previous specified PROJECT config file. This file will normally contain settings specific to an entire project and these override any similar settings in the DRIVER config files.

  3. command-line specified DRIVER config file
    Rarely used. A config file, other than SAFSTID.INI, intended to override settings in any SAFSTID.INI file located in the DRIVER ROOT directory.

  4. default DRIVER config file
    SAFSTID.INI located in the DRIVER ROOT directory. The DRIVER ROOT would normally be provided in a previous config file or as a command-line parameter. This config file will contain the bulk of the configuration information that is specific to the driver and independent of any project or test being executed.

In general, you want to provide the bare minimum of command-line parameters and place all remaining info in one or more configuration files. The total of all command-line parameters and config file information must enable the driver to locate valid driver and project root directories, project subdirectories, and all other items necessary to run a specified test. See the DefaultDriver.run() link below for all the neat things the driver will do prior to launching the test!

An example invocation, providing the bare minimum command-line parameters:

This then expects TIDTest.INI to contain the information concerning which test to run, and where the PROJECT ROOT and maybe the DRIVER ROOT directories are located. The remaining configuration information can reside in SAFSTID.INI files located in these directories.

Sample TIDTest.INI in c:\SAFSProject specific to one test:

Sample SAFSTID.INI in c:\SAFSProject used by all tests:

And that is enough for the TID to run the TIDTestCycle.CDD test. Assuming, that test exists in c:\SAFSProject\Datapool\ as expected.

Of course, more of the configuration parameters necessary for desired engines will have to be in those configuration files once the engines actually become available.

See Also:
DefaultDriver.run(), Command-Line Options, Configuration File Options

Field Summary
 
Fields inherited from class org.safs.tools.drivers.DefaultDriver
cycleLog, cycleStack, driverConfigPath, engineObjects, enginePreference, engines, locator, projectConfigPath, safsmonitor, status, stepLog, stepStack, suiteLog, suiteStack
 
Fields inherited from class org.safs.tools.drivers.AbstractDriver
benchSource, configInfo, counts, cycleflowcontrol, cycleLinkedFac, cycleLogMode, cycleLogName, cycleSeparator, cycleSuffix, datapoolSource, debug, difSource, driverName, driverRootDir, exitCycle, exitSuite, expressionsOn, input, ipcommands, logLevel, logs, logsSource, maps, millisBetweenRecords, perTableFlowControl, projectRootDir, statuscounts, stepflowcontrol, stepLinkedFac, stepLogMode, stepLogName, stepSeparator, stepSuffix, suiteflowcontrol, suiteLinkedFac, suiteLogMode, suiteLogName, suiteSeparator, suiteSuffix, testLevel, testName, testSource, tidcommands, tidcomponent, vars, verifySource
 
Fields inherited from interface org.safs.tools.drivers.DriverInterface
DRIVER_CONTROL_POF_VAR, DRIVER_CONTROL_VAR
 
Constructor Summary
SAFSDRIVER()
          Default constructor using the default Driver name.
SAFSDRIVER(java.lang.String drivername)
          Constructor allowing an alternate Driver name.
 
Method Summary
static void main(java.lang.String[] args)
          Entry point for standalone Java execution.
protected  StatusInterface processTest()
          This is the one that actually opens and loops through our tests records! We use String-based Interface objects for inter-API communication.
 
Methods inherited from class org.safs.tools.drivers.DefaultDriver
addConfigureInterfaceSource, clearEnginePreferences, closeTestLogs, endEnginePreference, getConfigureLocator, getEngineInterface, getEnginePreferences, getEngines, getFullEngineClass, getGenericInterface, getLogID, getParameterValue, getPreferredEngine, getPreferredEngineIndex, getProjectDirectoryInfo, getRootDirectoryInfo, getSAFSMonitor, getTestLevelSeparator, hasEnginePreferences, initializeMiscConfigInfo, initializePresetVariables, initializeRuntimeEngines, initializeRuntimeInterface, initLog, insertConfigureInterfaceSource, isPreferredEngine, isPreferredEngine, openTestLogs, parseLogMode, run, shutdownRuntimeEngines, shutdownRuntimeInterface, startEnginePreference, validateLogParameters, validateRootConfigureParameters, validateTestParameters
 
Methods inherited from class org.safs.tools.drivers.AbstractDriver
addStatusCounts, getBenchDir, getConfigureInterface, getCountersInterface, getCycleLogMode, getCycleLogName, getCycleSeparator, getCycleSuffix, getDatapoolDir, getDebugInterface, getDifDir, getDriverName, getDriverRootDir, getFlowControlInterface, getInputInterface, getIPDriverCommands, getLogLevel, getLogsDir, getLogsInterface, getMapsInterface, getMillisBetweenRecords, getProjectRootDir, getRootVerifyDir, getStatusInterface, getStepLogMode, getStepLogName, getStepSeparator, getStepSuffix, getSuiteLogMode, getSuiteLogName, getSuiteSeparator, getSuiteSuffix, getTestDir, getTestLevel, getTestName, getTIDDriverCommands, getTIDGUIlessComponentSupport, getVarsInterface, isExitCycle, isExitSuite, isExpressionsEnabled, isPerTableFlowControl, setBenchDir, setDatapoolDir, setDifDir, setExitCycle, setExitSuite, setExpressionsEnabled, setLogsDir, setMillisBetweenRecords, setPerTableFlowControl, setProjectRootDir, setRootVerifyDir, setTestDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAFSDRIVER

public SAFSDRIVER()
Default constructor using the default Driver name. The constructor does nothing more than initialize internals and superclasses. Nothing else happens until DefaultDriver.run() is invoked.


SAFSDRIVER

public SAFSDRIVER(java.lang.String drivername)
Constructor allowing an alternate Driver name. The constructor does nothing more than initialize internals and superclasses. Nothing else happens until DefaultDriver.run() is invoked.

See Also:
AbstractDriver.driverName
Method Detail

processTest

protected StatusInterface processTest()
This is the one that actually opens and loops through our tests records! We use String-based Interface objects for inter-API communication.

Specified by:
processTest in class AbstractDriver
See Also:
AbstractDriver.processTest(), UniqueStringID, UniqueStringFileInfo

main

public static void main(java.lang.String[] args)
Entry point for standalone Java execution. Instances a new SAFSDRIVER object and immediately executes run().

See Also:
DefaultDriver.run(), Command-Line Options, Configuration File Options