The costs associated with test scripting are due to the development effort and the maintenance efforts. The approach of scripting used during test automation has effect on the costs. The bad approach of scripting will cause more cost efforts. Developing best scripting practices helps a lot in reducing total cost.
With fragile and easy techniques as ‘record and playback’ the developments costs are low but the maintenance costs are high and hence the overall costs are high. With advanced techniques as keyword driven testing, the maintenance costs are low but the development costs are high and hence the overall costs are high. The test manager has to choose wisely the technique to minimize the costs.
Linear scripting approach is a simple record and playback used by a testengineer to automate a test flow/ test case of a system. It can contain someredundant functions etc that may not be required at times.
Pros and cons of Linear scripting
Structured scripting uses control structures in the scripts. These control structures enable testers to control the flow of the test script/ test case. The control structures are typically ‘if-else’, ‘switch’, ‘for’, ‘while’ conditions/ statements that help in implementing decision making in script, in perform some tasks iteratively and capacity to call other common functions that house commonly needed functionality
Pros and cons of Structured scripting
Shared scripting is one of techniques in which the scripts representing an application behavior is shared amongst other scripts. This means that the application under test common functionality is scripted as shared scripts and these scripts are then called by other scripts. This makes the scripts modular in terms of common functionality. Such scripts due to the functionality can also cross the AUT boundary and can be used in other software applications as well.
Pros and Cons of Shared scripting
Data driven scripting
This technique separates data from the scripts and stores it into external repository as disk in form of files. So the script contains just the programmed code. This may be needed when the data needs to be varied over the test run. This script need not be modified if it is data that undergoes a change. At times the expected data can also be stored in the data files that have test data.
Pros and Cons of Data driven scripting
Keyword driven testing
It is an approach in which the control to check and execute operations in maintained with external data files. So the test data and the operations/sequence of the test is planned in external data file and extra library is need to interpret this data in addition to the conventional script. It is an extension of data driven testing.
Pros and Cons of Keyword driven testing