Designing Hybrid Framework in Automation (Part-2)

We have already discussed the implementation part of our Hybrid Framework(Part 1),Now we are going to focus on the the new enhancements that we have introduced while converting our keyword driven framework to hybrid framework.

New Capabilities:-
   1. Data drive the test (Parameterization)meaning running the same test case with varying set of data.
For this we implemented the concept of HLookup in Excel
Most crucial factor is taking our test data from from “Data” sheet of Excel.
Data Sheet in Hybrid Framework
Example: – Incase we wont to Launch “chrome” browser, in the “Value column” i.e. F3 cell of the sheet(Keyword) we would fetch data from “Data” sheet of our excel by using the following formula:-
HLookUp in Excel in UFT


  • we have used cell F2 ( named as STARTROW) to change the test data, like incase we want to run the test case for both browsers(IE and Chrome) we would change its value to 2, else we can mark it as 3 for running our test case only on chrome browser.
  • Further we have created Name Manager (of Excel) to set the range of “DATASHEET” .

          2.Error handling with user having flexibility to take screenshots incase of errors
In the properties of test case(open test in UFT to set Properties), user can set the value NO or Yes based on the preference whether screenshots are required or not.
Path: – Screenshot are saved in the word document at following location
Screenshot path in UFT
Note: – We have placed the corresponding code in “Word” library of the test case.

        3.Email options to send run status mail after execution
We have created a basic template structure of email to inform stakeholders for the run results (Please enhance this feature as per your requirements)
Code: – Email library of the test case contains the code
Note: – We have used outlook object for this purpose

Before using this feature please change the To and CC email id’s inside “fn_StopTest” (inside FrameworkRun library).

        4.  Code optimization with driver scripts just contains the call to triggering function
‘Driver Function call

          5.Better structuring of code into function libraries like Word,Email,Excel
This part is just extension of above point(4) .

We have segregated our code into logical divisions by creating appropriate libraries.
Test Case structure in Hybrid Approach
       6. Improvement in error reporting through UFT result viewer.
Our result viewer contains improvement in reporting.

Note: – We thought of creating Executionlogs for the run rather than using result viewer of UFT by using notepad file or any text editor ( we might be working on this in future.)

UFT Tutorials
Learn Selenium

Hybrid Framework in Automation (Part-1)

We started our journey to grasp the concept of framework in automation using keyworddriven approach, today we are going to shape our existing code into a more versatile form known as Hybrid framework.

Note:- Please read our post on Keyword Driven framework before starting with Hybrid concept.

Follow us on Facebook for more updates and learning!!!

Moving from Keyword to Hybrid Framework in UFT
Moving from Keyword to Hybrid Framework

What is Hybrid Framework?
In laymen terms it is the combination of all the frameworks (Keyword + Data + Modular), which takes the best of all of the available frameworks to create a robust approach for automation.

Thus hybrid approach takes the features of all the available frameworks plus the user specific modification to achieve an easier route for automation testing of the application.

Note: – There is no standard definition or guidelines for Hybrid approach and its components are the vision of the automation tester to make automation task least maintainable, easy to implement and adapt.

Steps for using the above framework:-
Note: – Similar to our keyword driven framework code, after downloading the code -> Extract the zip files -> open the “HybirdApproach” folder -> paste it inside c:Temp -> open the Driver script in UFT/QTP.
Folder structure Hybrid Framework
Folder structure of Framework

Before Run:-

Enable or disable the required features:-
  1.    Test Properties change set “Screenshot ” value to “Yes”, incase we want to capture error screenshots
  2. Similarly set “Email” value to “Yes”, to send test case run email with Pass/Fail status

Change the TestCase property to the required test sheet name of the test case.

Test Properties in UFT
Properties tab in UFT

After Run:-
Reset the counter in the excel to the starting data row, else it would always run for the last set of test data in “Data” tab of excel sheet.
Keyword sheet in Hybrid Framework
Reset the counter to 2 

What changes we need to do for using the framework for different test case?
To achieve this we need to do few basic changes:-

  • Simply save the given test case with the required new test case name say “TC_02_Search”
  • Input parameters:- change the value of “TestCase” to the required test case sheet say “TC_02_Search” and we are ready to run.

We learned the implementation part of our Hybrid Framework.
Hope You are able to successfully execute the test cases using this approach.
Please share your feedback or queries as comments below (further You can connect with us using 

In our next post we are going to discuss how we converted our Keyword driven framework to Hybrid Framework.