An automation testing framework is basically a combination of rules, set protocols, guidelines and standards that can be combined as a whole so as to influence the benefits of the scaffolding delivered by the framework.
Test automation is the use of special software to influence the execution and comparison of actual outcome with predicted outcome. The framework is primarily a scaffolding that is laid to give an execution environment. It provides the user with numerous benefits that helps in developing, execution and reporting automation scripts adequately. The framework is a system that is designed specifically to automate tests.
In a more simple term, a test automation framework is the merging of various guidelines to come up with automatic testing. The user need to follow these guidelines in order to exploit various advantages related to automated testing. These advantages come in different forms such as;
- Ease of scripting
- Recovery scenario
- Maximum maintenance
Approaches to Test Automation
There are various approaches that can be used to test automation. However, we are going to look at the two widely used approaches;
API driven testing
This is a testing framework that uses programming interface to the application to authenticate the behavior being tested. This approach may also be applied in testing public interface to modules, classes and libraries to ascertain that the results returned are correct.
Graphical user interface testing
This is a testing framework that designs user interface events such as mouse clicks and keystrokes and monitor the changes that result in the user interface, to ascertain that the behavior observed is correct.
Most users combine manual testing with test automation since it can be very expensive to solely employ test automation tools. This is a cost-effective measure.
Types of Test Automation Framework
We are going to look at various types of automation frameworks, majoring on the most popular in the market place. These frameworks differ with regards to their design. It is thus important to go for a framework that suits your project needs.
1. Module Based Testing Framework
This type of framework is based on Abstraction, one of the popular OOPs concept. This framework divides the whole “Application under Test” into different logical and isolated modules. A separate and independent test script is created for each module. When merged together, these test scripts build a larger test script which represents more than one module. The modules are separated by abstraction layer to prevent the modules from being affected by any changes made.
- The framework is quit scalable
- High level of modularization associated with this framework leads to easier and pocket-friendly maintenance.
- Any changes implemented on one part of the application does not necessarily affect other parts of the application.
- Whenever a software user wants to test various test scripts with different sets of test data, he/she will have to manipulate the test scripts.
2. Library Architecture Testing Framework
This type of framework is primarily built based on Module Based Testing Framework but with additional benefits. The major difference occurs in the application. Unlike Module Bases, where we divide the application being tested into test scripts, this framework segregates the application under test into functions that can as well be used by other parts, thus creating common libraries that can be used within the test scripts whenever required.
- It enhances a great degree of re-usability since the functions created can be used by various test scripts.
- High degree of modularization hence cutting down on cost.
- The framework becomes complicated due to the introduction of libraries.
- Change in the data will as well mean changes in the test scripts.
3. Data Driven Testing Framework
While automating any application, it may be required to test functionality different times with different set of data. If this is the case, the user can’t let the test data inserted in the test script. It is thus recommended to retain test data into an external data base. This type of framework helps the user to separate the test data and test script logic from each other. Some of the external data that the user can use for storage include; excel files, CSV files and property files among others.
- Increases maintainability and flexibility
- Reduces the number of scripts required in the test data
- Changes in the test data matrix do not affect the test script code
- Excellent proficiency is required in programming language, thus discouraging other users
- The whole process is tiresome is complex and tiresome.
The frameworks discussed above are some of the most popular frameworks in the market. Other popular frameworks include;
- Keyword Driven Testing Framework
- Hybrid Testing Framework
- Behavior Driven Development Framework