Using SAFS Embedded

a.k.a. 'Single-Process SAFS'

a.k.a. 'SAFS Without STAF'

Updated: 2014.07.25 by Carl Nagle


2008 Graph Image of Traditional Multi-Process SAFS:

While not indicated in the image, the above graphic shows the traditional multi-process nature of SAFS:

This multi-process nature is *required* when:


Recent requests from development teams wishing to use SAFS with Selenium WebDriver have included the following needs:

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.

To simply run everything embedded with no STAF in a single process (99% most common):

With the SAFS Debug Log running (also embedded):

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.


BUT...for the curious
and other possible usage scenarios, we can enable individual embedded features. This will mean that STAF will be running and we can still have external access and some monitoring and control over a running test.

To embed individual SAFS Services while still using STAF services:

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:

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:

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!