Software automation testing is a technique which can automate repetitive task or perform additional testing that would be hectic or time consuming to do it manually. The result of testing compares the actual result with the expected result. This is required to achieve continuous delivery and continuous testing. The whole process can be achieved using any automation tool or writing test scripts with some tools/frameworks etc.

Recently , I had a requirement in test automation where I had to look for test infrastructure to execute automation scripts on various test beds like  Windows, Linux(different flavors Ubuntu, Redhat / OS bitness 32 ,64 ). Then I came across a very simple and powerful tool/framework named STAF which helped me to overcome my automation requirements.


Let’s go deep dive into STAF Concepts, Services, handles etc. First thing first.

What is STAF ?
--------------


STAF stands for Software Testing Automation Framework.
Official site : There is no better source that this http://staf.sourceforge.net/

1. It is an Open Source automation framework designed by IBM.
2. It is designed around the idea of reusable components , called services.
3. It makes automation easier to create automated testcases and workloads.
4. It works as a remote test agent to control tests on multiple machines.

STAF runs as a daemon process, called STAFProc, on each system. In simple words, it operates in a peer-to-peer environment, there is no client-server hierarchy.

 





STAF Services

---------------

 

1. Services are reusable components which provide all the capabilities in STAF


2. It provides a specific set of functionalities (such as Logging, File Transfer, Process Invocation, etc.) and defines a set of requests that it will accept.


3. STAFProc sends the requests to services as strings which describe/tells the operation to perform.


4. Requests can be sent to services on the local machine or to another remote machine.



STAF services have 3 categories:

 

Internal STAF Services

 -The executable code for internal STAF services resides within STAFProc, which means they are always available and have a fixed name

 

External STAF Services

 -The executable code for external STAF services resides outside of STAFProc, for example in a Java jar file, a C++ DLL file, or a Rexx script file

 

Custom STAF Services

 -Note that you can also write your own custom services




List of STAF Internal services:



** We will see few services during demo video. 


STAF Handles

---------------

 

1. Every process that accesses STAF does so through a handle

- A handle, combined with the machine name, uniquely identifies a particular process

 

2. The combination of machine name and handle allows services to track requests from multiple processes on different machines



STAF Variables

---------------

 

1. STAF provides facilities to store and retrieve variables per handle, such as 

          - Configuration information

          - Runtime/state information

          - System environment information


2. Live within the STAFProc daemon, which allows them to be dynamically updated


3. STAF maintains a "system" variable pool that is common to all the handles on a given STAF Client


In the next part , will see the installation requirement for STAF followed by video demo.


Do subscribe to the blog for latest updates.