Updated: 2014.07.25 by Carl Nagle
While not indicated in the image, the above graphic shows the traditional multi-process nature of SAFS:
This multi-process nature is *required* when:
In order to satisfy these needs, we have engineered the ability for all SAFS features to run in a single process without STAF for Java-based automation tools--like Selenium WebDriver. Currently, only the SAFS/Selenium WebDriver engine has been properly prepared to run "Embedded" in this manner. Other engines--like the SAFS/RobotJ (IBM Rational Functional Tester) engine--may get this update if and when demand dictates.
Test Configuration Files (INI Files) control if, when, and to what degree SAFS runs "embedded".
Consult SAFS Config File Options for all the different options used to configure various runtime features of SAFS.
[STAF] NOSTAF=TrueWith the SAFS Debug Log running (also embedded):
[STAF] NOSTAF=True EmbedDebug="\fullpath\To\Desired\DebugLogFile.txt"
That's it. You're done. Enjoy.
Everything will run "embedded" in a single process using the single automation tool and no access to STAF or anything outside the process.
[SAFS_INPUT] ServiceClass=org.safs.staf.service.input.EmbeddedInputService [SAFS_LOGS] ServiceClass=org.safs.staf.service.logging.EmbeddedLogService [SAFS_MAPS] ServiceClass=org.safs.staf.service.map.EmbeddedMapService [SAFS_VARS] ServiceClass=org.safs.staf.service.var.EmbeddedVariableService
It should be noted that if either SAFSMAPS or SAFSVARS is embedded than BOTH must be embedded.
If STAF is running, SAFSVARS will still store variables in the STAF VAR service even if SAFSVARS is running embedded. This makes the values of variables and state information available to external processes.
To completely embed the SAFSVARS service--including the variables themselves:
[SAFS_VARS] ServiceClass=org.safs.staf.service.var.EmbeddedVariableService EmbedVars=True
There are also 2 native STAF services (SEM and QUEUE) heavily used by SAFS that can be "embedded" in scenarios in which SAFS is partially embedded but STAF is still in-use:
[STAF] EmbedSEM=True EmbedQUEUE=True
The "embedded" versions of these services are only implemented to satisfy the internal needs of SAFS. Having STAF running but embedding these services does little more than prove to us during development that we can run without touching STAF. Of course, without STAF running, these services are required to be embedded. This is automatic with the NOSTAF=True option.
Thanks for playing!