Introduction
In the below section I will be discussing scripting techniques used in various test automation projects. Advantages and disadvantages of implementing the techniques.
The various test automation scripting techniques are as follows
1. Linear
2. Structured
3. Shared
4. Data driven
5. Keyword driven
Linear scripting
Linear scripting approach is a simple record and playback used by a test
Engineer to automate a test flow/ test case of a system.
It can contain some redundant functions etc that may not be required at times.
Advantages
Test case is defined by script
Very low development costs
Programming skills required by testers are negligible
Disadvantages
A non-structured way of programming
Data is hard coded in scripts
Scripts are fragile, and hence maintenance costs are high
No sharing of scripts done and hence efforts may be repeated
Structured 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
Advantages
A structured approach to scripting
Test case is defined by script
Script maintenance required is less since they are robust, maintenance costs are relatively lower than liner scripting.
Planning is required to some extent
Disadvantages
Programming costs are slightly increased relatively to liner scripting
Intermediate programming skills are required by tester
Data is hard code in scripts
Knowledge of scripting language is required in addition to programming knowledge
Shared scripting
Shared scripting is one of techniques in which the scripts representing a 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.
Advantages
Scripts are structured
Test case is defined by script
Development costs are reduced relative to structured scripting since the effort duplication is eliminated
Intermediate programming skills are required by tester
Script maintenance and maintenance costs are relatively lower than linear scripting
Disadvantages
More planning is required due to modularity of scripts
No comments:
Post a Comment