Tips for building sound strategies for Test Automation
Development of an effective test automation framework is a complex process involving many stages. Every stage poses different set of challenges, which need to be scientifically addressed. A sound framework can be created on a solid foundation of a good test automation approach. Few guidelines for creating the same are being described below.
The process begins with formulating a sound strategy for automation beginning with the requirement phase & extending till the deployment phase. This process is kick-started by understanding the set of business rules and various conditions specified by the client. Such business rules and conditions bearing operational similarities are grouped together in the form of test cases or scenarios.
Stages of building strategies for Test Automation are as under:
Stage-1:
Capturing the requirement from the client:
Includes onsite transfer of knowledge like understanding of all transactions including customized transactions etc.
Stage-2: Understanding and analyzing the requirements: This may be done at the client end as well.
Stage-3: Clubbing the requirement into groups of test cases:
According to the flow, grouping of all the transactions in the form of different scenarios. This follows identification of common functionalities and clubbing them together in the form of different test cases.
Stage-4: Preparation of detailed design for automation:
Design for automation of scripts with special emphasis on the following
a) Use of common coding structure in all scripts.
b) Use of consistent / common coding conventions.
c) Reusability must be the key in coding.
d) Extensive use of object repository
e) Extensive use of error and exception handling functions
f ) Extensive use of data table objects.
g) Extensive use of environment variables
Stage-5: Creation of scripts according to the design
Stage-6: Reviewing the offshore scripts if any
Stage-7: Final delivery to the client
Practical Steps to Design Test Automation Strategies:
Step-1: Identification of Test Cases that are needed to be automated
Step-2: Identification of common functionalities & grouping them together
Step-3: Identifying / defining the standards for coding, naming conventions and templates
Step-4: Creation of library of re-usable objects
# Object Repositories, Tool & Application Settings etc
# Library for handling of Data Tables, Files, Strings & Dates etc.
# Login / Logout, code related to common functionality etc.
# Log Reporting, messaging, Error handling etc
Step-5: Development of script with record & play back Tool
Step-6: Verification & Validation of final script & then delivery.
Ten useful guidelines to identify Test Cases best suited for Automation:
1) Identify the tests, which call for extensive involvement of the testing engineers or the ones that would be sparingly run. These tests should be certainly dropped from the list of tests for automation.
2) Identify the application paths with high frequency of use during full-scale production run of the application. Automated testing shall be best for evaluating the performance of such application paths. These can include activities with higher volume with larger probability of failure of the software such as billing / invoicing or other customer records etc.
3) Identify the special processes having critical importance for the business like processing of sales order etc. Such strategically important activities must be identified for automated testing.
4) Identify the events requiring repetitive testing, which would be ideal for automated testing.
5) Identify the applications having longer life span during production, since automation of such applications shall provide maximum benefits.
6) Try to avoid the dynamic screens. Although we can automate them but the script tends to become too complex.
7) Try to avoid screens involving dynamic creation of objects.
8) Try to avoid business scenarios involving use of complex hardware.
9) Try to avoid scenarios, which call for complex coding for automation. Our endeavor should be to have less complex script, which would eventually be easily maintainable.
10) Try to prove the scenario with tables having provision of identifying every row by a unique number. Script complexity should be reduced while handling enterprise wide applications like price list tables etc. A complex script tends to take more time for execution especially when the table contains large number of rows for picking up the data.
Many More articles on Test Automation Frameworks
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.