What is Selenium Automation Framework and its types ?

Selenium framework is a code structure for making code maintenance simpler, and code readability better. A framework involves breaking the entire code into smaller pieces of code, which test a particular functionality.

There are mainly three type of frameworks created by Selenium WebDriver to automate manual test cases

  • Data Driven Test Framework
  • Keyword Driven Test Framework
  • Hybrid Test Framework

 Data Driven Framework

Data Driven 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 a modular based framework.

Keyword Driven Framework

Keyword Driven Framework is a type of Functional Automation Testing Framework which is also known as Table-Driven testing or Action Word basedtesting. The basic working of the Keyword Driven Framework is to divide the Test Case in to four different parts. First is called as Test Step, second is Object of Test Step, third is Action on Test Object and fourth is Data for Test Object.

The above categorization can be done and maintained with the help of Excel spread sheet:

Test Step: It is a very small description of the Test Step or the description of the Action going to perform on Test Object.
Test Object: It is the name of the Web Page object/element, like Username & Password.
Action: It is the name of the action, which is going to perform on any Object such as clickopen browser, input etc.
Test Data: Data can be any value which is needed by the Object to perform any action, like Username value for Username field.

The idea behind the Keyword Driven approach in automation is to separate the coding from the test case & test step. This helps a non technical person to understand the automation very well. 

Hybrid Test Framework

Hybrid Test framework is a concept where we are using the advantage of both Keyword and Data driven framework.

Leave a comment

Design a site like this with WordPress.com
Get started