address when problems occur. Some test scripts are business critical and might run as batch jobs in the middle of the night. The proper and successful execution of these business critical test scripts can serve as a dependency or pre-condition for other automated tasks.
Always include logic in business critical test scripts that automatically sends notification in the event of a failure.
To make test scripts reusable and easier to maintain, document all relevant information for executing the test script, a test script header, and any special conditions for execution of the test script. For example:
- Adjust dates within the application under test for closing of the books,
- Update any fields that require unique data,
- display settings for context sensitive/analog/bitmap recording,
- List other test scripts that are dependencies,
- Specify necessary authorization levels or user roles for executing the script,
- conditions under which the script can fail and work around for re-launching the script,
- Applications that need to be either opened or closed during the script execution, and
- Specific data formats, for instance, European date format versus US date format, etc.
Furthermore, scripts should contain a header with a description (i.e. what it is used for) and its particular purpose (i.e. regression testing). The script header should also include the script author and owner, creation and modification date, requirement identifiers that the script traces back to, the business area that the script supports, and number of variables and parameters for the script. Providing this information in the test script header facilitates the execution, modification, and maintenance of the script for future testing efforts.
Perform Version Control on Test Scripts
Many corporations spend tens of thousands of dollars for test tools, but ignore the by-product of the test tool -- namely the recorded test script. For companies building libraries and repositories of automated test scripts, it is highly advisable to perform version control on automated test scripts. Version control helps to track changes made to the test scripts, and to maintain multiple versions of the same test script.
Adhere to Test Script Naming Standards and Storage
Test scripts should follow the project's accepted naming standards and should be stored in the designated repository such as a shared drive or test management tool.
The test manager should designate naming standards for the test scripts that include information for these areas:
- Project name (i.e. GSI which stands for Global SAP Implementation),
- Release number (i.e. version or release number that will be released/deployed,
- Subject area or test category (i.e. SC for Security Testing, LT for Load Testing),
- Sequential test case number, and
- Title or function that will be tested (i.e. procurement from external vendors).
Following these tips enable testers to build more robust test scripts for their organizations. Also, developing maintainable test scripts maximizes the benefits of automated test tools. Companies can realize ROI from automated test tools when automated test scripts are used for future testing efforts, reducing the time needed to complete a testing cycle. The techniques above will help companies build test scripts that will meet these objectives.