Have you ever wondered the meaning of the word “Automation Framework” we keep hearing. Once we start learning automation testing, we come across this word so many times, I just decided to dig deeper in this well.
Imagine when you’re driving in your place; there are no traffic rules, everyone is driving the way they want. There will be so much chaos and confusion. To avoid the same there are a set of rules and regulations which need to be followed by everyone. The same applies when it comes to automation framework. Automation Framework is not a single tool or process, but it is a collection of tools and processes working together to support automated testing of any application. It integrates various functions like libraries, test data, and various reusable modules. A framework is a structured approach that provides guidelines and tools for creating, execute and managing automated tests. It makes sure that the automation testing is functional and resourceful.
Major Components of framework. A standard framework consists of test tools, equipment, test scripts, procedures, and people needed to make test automation resourceful and effectual. I have listed the major one’s below:
Different types of Frameworks 1. Linear Automation Framework. It’s also known as Record-and-Playback framework, is one of the simplest types of test automation frameworks. In this approach, test cases are created by recording user actions (e.g., mouse clicks, keyboard input) while manually interacting with the application under test. The recorded actions are then played back as automated test scripts.
2. Modular Based Testing Framework. The framework divides the entire “Application Under Test” into several logical and isolated modules. For each module, we create a separate and independent test script. Thus, when these test scripts are taken together builds a larger test script representing more than one module.
Moreover, once a tester is done writing a function library, you can also store a script in it. Since you can easily make changes in a single script, adjusting the entire application is not necessary. Thus, testing requires less time and efforts.
Requires technical knowledge.
Frameworks using Selenium Web driver. There are three types of frameworks which the Selenium Web Driver is the tool. Which are covered below:
3.Data-Driven Framework. It’s the framework where the data used for the testing is taken from the external files like MS-excel, CSV or Json etc. In simple words, we use the Data Driven Framework when we need to execute the same script with multiple sets of test data, whose storage is at a different place and not present inside the test script. Any changes made to the data will not impact the code of the test.
Fewer scripts required
High setup time
Excellent technical knowledge required
Troubleshooting is difficult
4.Keyword-Driven Framework. In this type of testing, we define the main functions as Keywords such as “open Browser: Opens the web browser and navigates to the application URL. “. It separates test development from your test design. It is a collection of executable keywords that simulate a user's actions, such as logging in, clicking a mouse, typing a name, etc.
A keyword-driven test consists of high and low-level keywords, including the keyword arguments, which is composed to describe the action of a test case. It is also called table-driven testing or action word based testing. In Keyword Driven Testing, you first identify a set of keywords and then associate an action (or function) related to these keywords. Here, every testing action like opening or closing of browser, mouse click, keystrokes, etc. is described by a keyword such as openbrowser, click, Typtext and so on. Pros
High development time
Complexity increase over time
High automation knowledge required
5.Hybrid Testing Framework. A hybrid framework is a technique wherein we can use of any of combination of two or more automation frameworks. As this is a hybrid framework, it has been based on the combination of many types of end-to-end testing approaches.
A hybrid test framework mitigates the weaknesses of different test frameworks. It provides flexibility by combining parts of different frameworks to harness the advantages. Hence, the efficiency of testing also improves.
Flexibility and Reusability
Support for Multiple Test Types
Complexity in Implementation
Learning Curve for New Testers
Maintenance Overhead for Customization
6.Behaviour Data Driven Framework. Behavior Driven Development (BDD) Framework enables software testers to complete test scripting in plain English. BDD mainly focuses on the behavior of the product and user acceptance criteria. In a BDD framework, test scenarios are written in a natural language format, such as Gherkin (Given-When-Then), which is easy for both technical and non-technical stakeholders to understand. Several BDD Tools are in use for different platforms and programming languages, some of them are: · Cucumber (Ruby framework) · SpecFlow (.NET framework) · Behave (Python framework) · JBehave (Java framework) · JBehave Web (Java framework with Selenium integration) · Lettuce (Python framework) · Cucumber -js(Java Script framework)
Readable and Understandable Test Cases
Focus on Business Value
Complexity in Test Maintenance