September 4, 2009

Add RUMM for Quality Automated Testing Scripts

Helix ALM
The quality of a product relies heavily on the quality of its ingredients. Ignoring one particular ingredient when creating automated test scripts can leave you with a set of “half-baked” scripts that require constant maintenance - some scripts run once successfully but fail after that, while others may contain the same sequence of steps that all need to be modified if a change needs to be made. A little RUMM at the start of the script development process will save you a lot of time and frustration in the future. RUMM stands for: Reusable You record a script that creates a username and password and logs into your application. The application requires that each username is unique, so prior to running the script again you must modify it to change the username. It only takes a few extra moments to update the script, but what if you need to create 100 new users or you want to run the script unattended? A simple modification to generate the username using a static string concatenated with the time function will permit the script to be run over and over without intervention. Understandable Scripts will not always be run by the tester who created them. Add comments describing what the purpose of the script is and any required input. This may be a paragraph at the top of the script as well as comments specific to a line or block of steps. If the script writes to a file, make sure the data and format of the file is described. It is almost impossible to “over comment” a script. Maintainable Change happens, and it will happen to your application. New functionality is added while older features are no longer supported. Create your scripts with this in mind – shorter scripts enable you to quickly locate the area that needs modification, and also makes debugging easier. Avoid hard coding values that you know will be changing – use variables instead. Modular Design each script to perform one function. You can then arrange these scripts as needed to create more elaborate tests. For example, one script may enter an order into the system. This script can then be executed prior to a script that deletes an order. Another script can be created to call the order script in a loop, allowing you to create as many orders as needed. This also helps maintainability – if the order entry process changes only the order entry script needs to be modified. Creating RUMM scripts may involve more time initially, but the payoff is avoiding the bitter taste of constant script upkeep!