July 19, 2020

Selenium Framework



Selenium Framework:

Selenium Framework is a code structure that helps to make code maintenance easy. Without frameworks, we will place the “code” as well as “data” in the same place which is neither re-usable nor readable. Using Frameworks, produce beneficial outcomes like increased code re-usage, higher portability, reduced script maintenance cost, higher code readability, etc.

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

· Data-Driven Test Framework

· Keyword Driven Test Framework

· Hybrid Test Framework


Data-Driven Test Framework:

In the data-driven framework, all of our test data is generated from some external files like Excel, CSV, XML or some database table.

To read or write an Excel, Apache provides a very famous library POI. This library is capable enough to read and write both XLS and XLSX file format of Excel.


Keyword Driven Test Framework:

In the keyword-driven test framework, all the operations and instructions are Keyword Driven Framework is a type of Functional Automation Testing Framework which is also known as Table-Driven testing or Action Word based testing. The basic working of the Keyword Driven Framework is to divide the Test Case into 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 spreadsheet:

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 click, open 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.



Hybrid Test Framework

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

Here for keywords, we will use Excel files to maintain test cases, and for test data, we can use data, provider of TestNG framework.









No comments:

Post a Comment

Please let me know if you have any doubts.

Key concepts in Pipeline

 1. Agent- To build your code or deploy your software using azure pipelines, you need at least one agent. Two types of agent- Microsoft host...