STAF – Software Testing Automation Framework
The Software Testing Automation Framework (STAF) is an open source, multi-platform, multi-language framework designed around the idea of reusable components, called services (such as process invocation, resource management, logging, and monitoring).
STAF includes a number of services that provide specific functionality. The most prominent of these is called the STAf eXecution engine (STAX), which executes test scripts.
Set up STAF on your box:
• Go to URL ‘http://staf.sourceforge.net/’
• Download latest STAF x.x.x
• Install it
1) Open a STAF Perspective
a) Select Window -> Open Perspective -> Other
b) Select STAF
c) Click Ok
2) Create a STAF Project
a) File -> New -> STAF Project
b) Enter desired project name
c) Click Finish
3) Create a STAF Machine Group (optional) – STAF Machines (next step) may exist without a group
a) File -> New -> Machine Group
b) Select the STAF project created above as the container
c) Enter desired Group Name
d) Click Finish
4) Create a STAF Machine
a) File -> New -> Machine
b) Select the STAF Machine Group or STAF Project as the container
c) Enter the Hostname of the desired machine (this machine must be running STAF)
d) Optionally enter the interface and/or port needed to communicate with the machine. In most circumstances, these items may be left as the “Local Default” in which case STAF will perform the standard interface cycling when attempting to establish communication with the machine.
e) Click Finish
5) Open the STAF Editor for the newly created Machine
a) Double-click the newly created machine in the STAF view (left panel of Eclipse)
b) NOTE: STAF must be running on the local machine and on the remote machine
c) Use the editor to interact with STAF on remote machines
6) The STAF Editor is an Eclipse Multi-Page Editor with 2 static pages with dynamically loaded pages based on the installed plug-ins and currently running services on the given STAF endpoint.
a) The main editor page, “STAF Editor” contains three sections or sashes that may be resized:
i) Command Submission – This sash contains some basic information about the STAF endpoint and widgets to submit STAF commands. All commands submitted from this section will appear in the “Command History”.
ii) Command History – This sash contains the history of commands submitted via the STAF Editor. This information is persisted when the editor is saved. Double-clicking an entry will populate its data in the “Command Submission” widgets for re-submission or editing.
iii) Command Results – When a command that has completed is selected in the “Command History” table its result data will appear in this section. The type of widget used to display the data will be dynamically created based upon the format of the result data.
b) The “Properties” page allows the hostname, port, and interface of the STAF endpoint to be modified. It also allows mappings between service names and STAF Editor extensions to be created. However, this functionality is currently moot as extensions have thus far only been created for internal services.
c) The Beta release contains extensions for a few of the standard STAF internal services (HANDLE, SERVICE, TRUST, VAR). These pages may be used to retrieve data from the service and in some instances modify data or settings on the service.
i) HANDLE – The Handle service extension displays current handle information. The types of handles displayed may be filtered using the checkboxes at the top of the page. Use the refresh button to retrieve updated information from STAF.
ii) SERVICE – The Service service extension displays information about registered services and current requests. This information is separated into two tabs, Requests & Services. Select an item from the list to display detailed information. Use the refresh button to retrieve updated information from STAF.
iii) TRUST – The Trust service extension displays and allows modification of STAF trust settings. The input widgets at the top of the page may be used to add new trust settings. Double click an entry in the table to populate its information into the input widgets. Use the refresh button to retrieve updated information from STAF.
iv) VAR – The Var service extension displays and allows modification of STAF variables. The input widgets at the top of the page may be used to add or update variables. Double click an entry in the table to populate its information into the input widgets. Use the refresh button to retrieve updated information from STAF. The bottom section of the page may be used to test STAF variable resolutions. Enter the text to resolve in the left text pane, click “Resolves To ->” button and the resolved string is displayed in the right text pane.
Please feel free to post queries or share your views related to above.