Selenium is the big player in the open source automation testing suite. Even google, Netflix, Fitbit are using Selenium for testing.
The Selenium framework consists of automation testing tools bundled into a suite, that can run tests directly on the browser and automatically rerun without manual input.
Selenium IDE (Integrated Development Environment), Selenium Grid, Selenium WebDriver are parts of selenium.
In layman terms, Framework is a set of guidelines or best practices, that are to be done in a systematic manner. Main advantage of using a framework is for readability and reusability.
With the framework in place, you can read data progressively, even if the data changes every time, we access the application.
It is a platform which consists of various hardware, software, web service automation framework and automation testing tools. The platform is developed based on a set of assumptions that helps in reliable analysis of issues and bugs in the system or application that is being tested.
The five main types of selenium framework are linear scripting framework, modular testing framework, behavior driven development testing framework, data-driven framework, keyword driven testing framework and hybrid driven testing framework.
Linear scripting framework:
In a linear scripting framework, the test automation is carried out by running pre-written test cases/steps in sequential order. It is also known as a record and playback framework as testers record the sequence of steps and run them again to catch the issues/defects.
Modular testing framework:
As the name suggests in the modular testing framework, the application under test is divided into smaller modules based on functionality. Testers then code test cases for each module and run them separately. In this framework, there can be a master test script, which is a combination of module-based test scripts, linked in an orderly manner. It is based on OOPs concept abstraction. Change in one module will not affect other modules under test.
In a linear and modular testing framework, the data is hard coded to the test scripts. It is a major drawback, when there is a need to test the application with varying data. That is when, data-driven framework comes into picture. Here the data is stored separately in an external database, which can be as simple as an excel spreadsheets or text files. From the external database, the data is sent into the test scripts. So, simply put, in a data-driven framework the test logic and data are stored separately.
Keyword-driven framework is the extension of data-driven framework. Here along with the data, keywords are stored externally in a tabular format. Hence this is also known as table driven framework. This framework is application independent. Test function to be used is determined based on the keywords.
Hybrid test automation framework:
Hybrid testing framework is the combination of above frameworks, based on the requirement. It is best suited for the agile environment. It is a flexible framework, designed to get best test results.
Behavior-driven Development testing framework:
Behavior-driven Development testing framework are user friendly. These frameworks don’t require end users to know programming and the end users being business analysts, testers, developers. They help in automation of functional validations. They are in understandable and readable format. It fills the gap between the team members working on the Project.
Out of above frameworks, keyword driven, data driven, and hybrid testing frameworks are widely used with selenium.
Understanding the underlying concept of framework, selecting the right framework, effectively implementing and executing it will determine your success in automation testing.