Types of Test Automation Frameworks:
· Linear Scripting Framework
· Modular Testing Framework
· Data Driven Testing Framework
· Keyword Driven Testing Framework>
· Hybrid Testing Framework
· Behavior Driven Development Framework
In this post, we will learn the following:
· 1. What is a framework
· 2. Linear Scripting Framework
· 3. Modular Testing Framework
· 4. Data-driven Framework
· 5. Keyword Driven Testing Framework
· 6. Hybrid Driven Testing Framework
· 7. Behavior Driven Development Testing Framework
A framework defines a set of rules or best practices which we can follow in a systematic way to achieve the desired results. So the above-mentioned test automation frameworks deal with best practices to achieve the goals of our automation project.
Linear Scripting Framework is a basic level test automation framework which is in the form of ‘Record and Playback’ in a linear fashion. This framework is also known as ‘Record and Playback’ framework. This type of framework is used to test small sized applications. In this type, creation, and execution of test script are done individually for each test case individually. Using this framework, we could generate test scripts (Record and playback) without planning much or consume much time but it has its own drawbacks such as lack of reusability and hard coding the data does not allow to run with multiple data sets.
In the modular testing framework, testers create test scripts on module wise by breaking down the complete application under test into smaller, independent tests. In simple words, testers divide the application into multiple modules and create test scripts individually. These individual test scripts can be combined to make larger test scripts by using a master script to achieve the required scenarios. This master script is used to invoke the individual modules to run end to end test scenarios. In this framework, testers write function libraries to use it whenever required. This is AKA modularity framework or module-based framework.
Data-driven test automation framework is focused on separating the test scripts logic and the test data from each other. Allows us to create test automation scripts by passing different sets of test data. The test data set is kept in the external files or resources such as MS Excel Sheets, MS Access Tables, SQL Database, XML files etc., The test scripts connect to the external resources to get the test data. By using this framework we could easily make the test scripts work properly for different sets of test data. This framework significantly reduces the number of test scripts compared to module-based framework.
This framework gives more test coverage with reusable tests and flexibility in the execution of tests only when required and by changing only the input test data and reliable in terms of no impact on tests by changing the test data but it has its own drawbacks such as testers who work on this framework needs to have hands-on programming knowledge to develop test scripts
It is also known as table-driven testing or action word based testing. In Keyword-driven testing, we use a table format to define keywords or action words for each function or method that we would execute. It performs automation test scripts based on the keywords specified in the excel sheet. By using this Framework, testers can work with keywords to develop any test automation script, testers with less programming knowledge would also be able to work on the test scripts. The logic to read keywords and call the required action mentioned in the external excel sheet is placed in the main class. Keyword-driven testing is similar to data-driven testing.
Even though to work on this framework doesn’t require much programming skills but the initial setup ( implement the framework) requires more expertise.
Hybrid Test automation framework is the combination of two or more frameworks mentioned above. It attempts to leverage the strengths and benefits of other frameworks for the particular test environment it manages. Most of the teams are building this hybrid driven framework in the current market.
The purpose of this Behavior Driven Development framework is to create a platform which allows everyone (such as Business Analysts, Developers, Testers etc,) to participate actively. It requires increased collaboration between Development and Test Teams. It doesn’t require the users to be acquainted with a programming language. We use non-technical, natural language to create test specifications.