What is a framework?
A framework defines a set of rules or best practices that we can follow in a systematic way to achieve the desired results.
Types of Test Automation Framework
Linear Scripting Framework
Advantages of Linear Scripting Automation Framework
OR
Disadvantages of Linear Scripting Automation Framework
OR
Modular Testing Framework
Advantages of Modular Testing Framework
OR
Disadvantages of Modular Testing Framework
OR
Library Architecture Framework
Advantages of Library Architecture Framework
OR
Disadvantages of Library Architecture Framework
OR
Data-Driven Framework
Advantages of a Data-Driven Framework
OR
Disadvantages of a Data-Driven Framework
OR
Keyword Driven Testing Framework
Advantages of Keyword-Driven Framework
OR
Disadvantages of Keyword-Driven Frameworks
OR
Hybrid Driven Testing Framework
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.
Behavior Driven Development Testing Framework
The purpose of this Behavior Driven Development framework is to create a platform that 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. Some of the tools available in the market for Behavior Driven Development is JBehave, Cucumber, etc.,
Why Do We Need a Test Automation Framework?
How to build a test automation framework?
Where you have applied OOPS in Automation Framework
ABSTRACTION
#1. ABSTRACTION
Abstraction is the methodology of hiding the implementation of internal details and showing the functionality to the users.
In Page Object Model design pattern, we write locators (such as id, name, xpath etc.,) and the methods in a Page Class. We utilize these locators in tests but we can’t see the implementation of the methods. Literally we hide the implementations of the locators from the tests.
Where you have applied OOPS in Automation Framework
INTERFACE
#2. INTERFACE
Basic statement we all know in Selenium is WebDriver driver = new FirefoxDriver();
Detailed explanation on why we write WebDriver driver = new FirefoxDriver(); in Selenium.
WebDriver itself is an Interface. So based on the above statement WebDriver driver = new FirefoxDriver(); we are initializing Firefox browser using Selenium WebDriver. It means we are creating a reference variable (driver) of the interface (WebDriver) and creating an Object. Here WebDriver is an Interface as mentioned earlier and FirefoxDriver is a class.
An interface in Java looks similar to a class but both the interface and class are two different concepts. An interface can have methods and variables just like the class but the methods declared in interface are by default abstract. We can achieve 100% abstraction and multiple inheritance in Java with Interface.
Where you have applied OOPS in Automation Framework
INHERITANCE
#3. INHERITANCE
The mechanism in Java by which one class acquires the properties (instance variables) and functionalities of another class is known as Inheritance.
We create a Base Class in the Automation Framework to initialize WebDriver interface, WebDriver waits, Property files, Excels, etc., in the Base Class.
We extend the Base Class in other classes such as Tests and Utility Class.
Here we extend one class (Base Class like WebDriver Interface) into other class (like Tests, Utility Class) is known as Inheritance.