Why SAFS sucks

One of my least favourite things in my career was being handed a SAFS framework implementation to revive, expand and maintain. At first I was positive & optimistic, but after delving deeper I continually came back to the same thought: SAFS sucks!

Thumbs Down

Here’s why:

SAFS tries to be a tool-neutral framework optimised for maintainability, but in reality I have found it to actually be very unmaintainable. There are many reasons for this, but I can narrow it down to one main reason: SAFS uses a data presentation language* for both the test case design, and the test script design. This makes it both difficult and frustrating to design test scripts.

The reason that data presentation languages are bad in this context is that it removes control from the user. Instead of having the entire functionality and power of a scripting language at your peril, you have a limited set of “action words”. You never feel in control. An analogy is a DJ who plays vinyl is often better than one who plays CDs. This is because the vinyl DJ has more control, they can touch the vinyl, feel the vinyl, know the vinyl. The CD DJ simply presses buttons that sends instructions to the laser to perform actions on the CD. It’s the same when driving a car; I prefer ‘stick’ as I have more control. Using SAFS data tables for test script design would be like using Watir but saying you can’t use Ruby!

I believe that this is the main reason, but I have some others:

The forced three-tiered decomposition approach makes it less maintainable. I like to deliver the best solution for the problem, so when you have a framework in place that says “no, you can’t call a step table (where the work is done) from a cycle table (where the test is called)” I end up delivering a poor solution just to conform. A poor solution is going to be less maintainable as it has ultimately been a sacrifice.

SAFS is ridden with nasty, horrible, global variables. Data can only be passed to and from other tables using global variables. It is like anti-poka-yoking your framewok, how easy can I make it for sometime to introduce an error?

Execution time is shocking. I implemented the same test case in three different tools to collect some execution time data. Testing a Java Swing client using vanilla QuickTest Professional took 20 seconds to execute. vanilla Rational Functional Tester took 50, RRAFS took over 4 and a half minutes! Thats a huge 1700% slower than QuickTest Professional.

SAFS makes it difficult to attract and retain skilled software testing engineers: Skilled staff don’t want to write SAFS data tables. They want to write some code and make an elegant efficient solution where they are in control. They need intellectual challenges of which SAFS excel sheets can’t provide. If I am ever in a job interview again and I hear the word “SAFS” I will make a quick exit for the fire escape.

Test Automation is context driven; but SAFS tries to be a ‘one size fits all’ framework: One of the reasons I love Watir so much is that it isn’t a framework or a tool, but a library. As Bret Pettichord says:

To some degree this is simply a matter of seeing Watir as a library rather than a tool. Although we want to grow Watir and make it into something that is reasonably able to be the basis of a testing framework, we also want it to be flexible enough to allow people to adapt it to their own needs.

Using binary excel files, such as SAFS ‘Test Generator’, makes it difficult to collaborate on test scripts. When you have tests defined in an excel file which is being simultaneously updated by two different people, it is difficult to compare and merge those changes. It is so much easier to do this if you use straight ASCII files (such as ruby scripts!) using a standard SVN client such as tortoise.

You can’t compile or syntax check a SAFS excel file; the feedback loop is too long. To work out if your SAFS script is right you have to generate the SAFS low level files and run the test, only then can you can realise that you made a small typo on one of the steps. Start all over again.

The ‘Process Container’ screen mapper doesn’t support frequent screen changes. Each time a screen changes, even if it’s only a single field, you need to ‘remap’ the whole screen. What makes this worse is that all previous customisation of screen element names (from the defaults) is lost, so potentially all your scripts will no longer run.

So there it is. This is why I don’t like SAFS. I will be really interested to know if anyone out there actually loves likes SAFS and if so, how they get around what I have mentioned above.

* See Bret Pettichord’s excellent “HomeBrew Test Automation” presentation (PDF – Page 26)
** Picture by r80o (Creative Commons)

2 thoughts on “Why SAFS sucks

  1. Actually I’m not sure wheter to give SAFS a try or not. Some of the points you mentioned don’t really encourage to use SAFS (three tiered decomposition, global variables, execution time, missing syntax check, ‘Process Container’ screen mapper) – but some points sound quite logically to me. The framework holds the control and it simplifies the usage of a test tool like Functional Tester. Of course thats not exactly what a developer wants but if you have a bunch of testers with little technical abilities (especially no programming skills) and must provide them with a solution which allows them to automate their regression tests themselves you are forced to find a solution like SAFS. Otherwise you have to write an additional abstraction layer on yourself…

  2. There are strong benefits in using excel sheets or the like to drive automated tests but the problem with SAFS is that the test script design is also done in excel.

    I think you really need a technical tester/programmer to do the hard work of designing a maintainable automated testing framework to suit your context and that can be easily used by the other non technical testers. This means providing a excel template that can be used by non technical testers to design test cases. The excel template should be abstracted from the code and be business focussed. This way it will provide a nice bridge between the test case design and the test script design.

    If I didn’t have, and couldn’t get, a technical resource to design a maintainable contextual automation framework I wouldn’t recommend automated testing because I believe it ultimately won’t be successful and will let your project down.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s