Good automation is more than frameworks, tools and scripting. The inherent structure of scenarios/cases plays a vital role in ensuring rapid development and optimized maintenance.
Typical structure of any automation script and the factors that contribute to the complexity in each step are,
- Setup – Prerequisites to be done before ‘excitation’. Here the # of steps to do this job contributes to the complexity.
- Execute – ‘Excite’ the system with inputs. Here the # of inputs, the kind of inputs (+/-) , order of inputs, dependency of inputs etc contributes to the complexity.
- Oracle – Check outcomes to determine pass/fail. Here the variety of behaviors to check and the #of checks for each behavior contributes to the complexity.
- Cleanup – Inverse of ‘setup’. Here again the # of steps to do this job contributes to the complexity.
So to make it a scenario less complex (to make it automatable) ask yourself,
- Does the TS look for a variety of defects?
- Does the TS check for a specific behavior?
Simplify the scenario by decomposing it into various “levels” (targeted for specific defect types) and Split the scenario such that each TS checks a specific combination of conditions.