Automation Frameworks are mainly useful to reduce the test effort and maintenance costs. Also these frameworks are set of rules and guidelines used for automating the Test cases. This tutorial gives an overview of all the Automation frameworks
for the QA professionals interested to switch to Automation Testing.
Modular Framework:
Modular Framework is the approach where all the test cases are first analyzed to find out the reusable flows. Then while scripting, all these reusable flows are created as functions and stored in external files and called in the test scripts wherever required.
Advantages:
Modular division of scripts leads to easier maintenance and also the scalability of the automated test Scripts are independent to write.
Disadvantages:
Since data is still hardcoded in the script, the same test case cannot be run for multiple data values without changing data after each run.
Additional time is spent in analyzing the test cases to identify with reusable flows.
Good programming knowledge is required to create and maintain function libraries.
Datadriven framework:
Example: DataDriven Fwk using Data Provider
In Data Driven Framework, the data is NOT hard-coded in the test scripts. Instead, it is stored in some external files. The test script first connects to the external data source and then extracts the data from that source.
Advantages
Since the data is kept separate from the test script, the same script can be run multiple times for different sets of data (which can be kept in multiple rows in the data sheet).
Changes made in the test data don’t affect the test scripts in any way and vice versa.
Disadvantages
Additional effort and good technical expertise is required to create functions that connect to the external data sources to retrieve the data.
Keyword framework:
In Keyword Driven framework, you can create various keywords and associate function with each of these keywords. Then you create a Function Library that contains the logic to read the keywords and call the associated action.
Advantages
The keyword and function libraries are completely generic and thus can be reused easily for different applications
All the complexity is added in the function libraries. Once the libraries are ready, it becomes very easy to write the actual test script steps in excel sheets.
Disadvantages
Lot of time and effort needs to be spent initially to create the function libraries.
The benefits of the keyword driven framework are realized only after it has been used for longer periods of time.
Very high programming skills are needed to create the complex keyword library functions.
Hybrid framework:
Hybrid Framework is a framework that is created by combining different features of any of the frameworks mentioned above. Based upon your requirements, you can combine the features of any of the above frameworks to come up with your own version of Hybrid Framework.
Advantages
The main advantage of this approach is that you can use the best features from all the types of frameworks to create your own.
Disadvantages
The framework is highly complex and needs very good programming expertise and experience to build a Hybrid Framework from scratch.