Hybrid Framework with Page Object Model Design Pattern

Posted By : Sakshi Dewan Gandhi | 15-May-2018

What is a Hybrid Framework:

A Hybrid Framework is a name given to Data Driven Automation Framework when applied with Page obeject or Page Factory Model. One major reason for following this approach is that all the data gets fetched form the Excel File Source as in Data Driven Framework and Page Object Design Model is very useful organisation of the Code in order to make it reusable and easily maintainable.

 

The concept of Hybrid Model:

In order to work in a Hybrid Framework, one has to keep the Code files organized in a certain way which is predefined. The project is implemented in different Layers, which are as follows:

 

Layer-I       Page Layer

Layer-II      Test Layer

Layer-III     TestBase Layer

Layer-IV     Environment Variables Layer

Layer-V      Testdata Layer

Layer-VI     TestUtil Layer

Layer-VII    Reporting Layer

 

Page Layer: In Page Layer we define the "page-class" for all the web Pages in the Software Application. 

 

Test Layer: In Test Layer, we define the Test Methods for every Page Class.

 

TestBase Layer: It is the Parent class of all the classes. In Test Base Class we define whatever the predefined conditions are there like: Launching the Browser, Maximising window, Page load timeout method, implicit weight and delete all cookies, Properties, Features etc.

 

Environment Variables Layer: In this layer, all the environment variables are declared and their properties. Config properties are defined in the separate file. Environment variables are defined in another, url,username, password, browser, other things which will be required in the whole project are defined under this layer.

 

Test data Layer: Test Data in Excel File is kept under this layer and we fetch it via Apache POI library files. Store data there, read data from the files and write data into these files.

 

TestUtil Layer: Here in this layer we keep Screenshot; how to take screenshot method will be there, common utilities will be defined which will be used in the project other than project testing like assertions, and also some generic functions.

 

Reporting Layer: Here in this layer TestNG output file is used sometimes for Extent Reports, CML Report etc. These reports have their HTML versions which can be seen on the browsers.

Related Tags

About Author

Author Image
Sakshi Dewan Gandhi

Sakshi has experience into Testing, which comprises of Functional, Performance and End-to end-System Testing. She has worked in various domains like: Telecom, E-Commerce, E-Learning and Language Translation.

Request for Proposal

Name is required

Comment is required

Sending message..