If I'm going to talk about what I do, I need to make a brief introduction on the tools I use and develop. And that's STEP and Electron respectively. Today is STEP's turn.

STEP is a framework designed and developed by Sun engineers in PIT (Pre-Integration Testing) that makes it easier to run a specific set of tests in a system or a set of systems.
It's developed in Java (the engine), Ksh, and Expect.

The idea is simple but powerful. There's a framework and a set of "STEP packages", each of one of those contains both a wrapper and a test source. The framework connects to the systems specified in the wrapper, installs the STEP package, and then using its code it prepares the systems, runs the tests contained in the test source, retrieves and prepares the results, and finally uploads the results to a database for analysis.

Now the important part for me are the wrappers. The test source is normally developed by the QA developers in Sun and submitted to us - PIT - for integration so we can test whatever that code has been designed to test, and regarding the framework although I've done some bug fixes and minor code contributions I'm not really much more than a user so for blogging purposes it'll be enough to think of it as the "magic sauce that makes the whole thing work".

Every wrapper consist of two parts: the control module, and the functions or "steps".

Control module
: Here we define how the test will be driven, i.e. how many systems do we need to run the test, how the framework will connect to the systems under test (SUT), the order of the functions we want to run in every SUT, and the interactions between them.

: They're coded in Ksh and here's where we can prepare the SUTs to run the test. For every SUT, the following functions will need to be defined (although predefined functions can be used too):

verifyMachineEnvironment: Checks the status of the SUT.verifySuite: Checks the status of the test source.
configure: Configures the SUT (i.e. checks and adds needed packages, manages services, edits the configuration of the system, ..)
runTest: Passes control to the test source (sometimes this involves compiling it too).
unConfigure: Leaves the SUT in the same status as it was before running 'configure'.
getResults: Retrieves the results that the test source generated, plus any relevant information from the SUT we might consider useful.
processResults: Formats the results and builds the test report.
Now that's what a normal STEP package looks like. I used this platform a slightly different way for my main project (adapting our automated testing environment - Electron - to IPS and AI). But that's for another day..