Understand Keyword Driven Framework by using UFT – (Part 1) – User friendly Tech help

Framework is to automation as beauty is to Nature. Amazing thing about our mother nature is that it brings happiness and rejuvenates our energy level, similarly framework makes our automation task more manageable and brings elegance in coding.Today we would be focusing on the fundamental architecture of the framework. We would be beginning with Keyword driven framework and then we would polish it as our Hybrid framework.
n
nWe won’t be discussing much of theory but would be doing lot of coding 🙂
n
We have divided this topic into 3 Part Tutorial :-

n

Working hard for something we don’t care about is called stress; working hard for something we are passionate about is called Love”. So in case one loves automation we would always we improving framework. We always believe that no framework is perfect and everything is requirement based.Do share your comments and knowledge so it is beneficial for our fellow coders,We can also be in touch through Fb,G+,Twitter or Email.
n
nNote: – In our previous post we discussed various components of framework but in the below code we are just implementing the basic flow. we can further segregate them as per our requirement,to add more modularity.
n
nPlease download the code and follow the tutorial to get hold of this framework.
n

n

Download link

n

nNote:- After downloading the coding -> Extract the zip files -> open the “KeywordApproach” folder -> paste inside c:Temp -> open the Driver script in UFT/QTP.

n

n

n

n

n

n

n

n

Folder structure of the Keyword Driven Framework

n

nKey Components:-
n
Driver Script:-
nThis is our driving component, it contains the call to other components (Functions)
n
nFunction Library:-
nThis contains our functions, which we have segregated based on the operation level:-

n

    n

  • Main Lib: – This contains our framework level functions, which further call the other libraries.
  • n

  • Keyword Lib: – This contains the functions which defines our Keywords in the Keyword Sheet.
  • n

  • Excel Lib: – This library contains the Excel level functions like to fetch data or write data into excel.
  • n

n

Keyword Sheet:-
nIt consists of our keyword data, which are taken as input to our framework to initiate action on the application.
n
nRecovery Scenario:-
nWe have added the “ApplicationCrash” recovery scenario, which re-run our test, incase our application(we have taken chrome and IE) crashes.
n
nObject Repository:-
nRepository of our objects used in the framework.
nNote: – We would be using special naming conventions for each type of object, this is also part of our framework.
n
nFlow Diagram:-
n

n

n

n

n

n

n

n

n

Flow of Keyword Driven Framework

n1.Driver Script interacts with Excel Lib.
n2.Excel Lib fetch number of rows to be run from “Keyword Sheet” i.e our data sheet.
n3.Driver interacts with Main Lib
n4.Main Lib with the help of Excel Lib it fetch the data from “Keyword Sheet” for the first row into a array
n5.Keyword lib creates the heiarchy of object like browser.page.object
n6.Object is fetched from OR
n7.Final action is performed on the Application under Test (AUT)
n
nNote:-RS inthe flow diagram, refers to recovery scenario to handle exceptional scenarios.n

Summary:-
nSo far we did basics about the key components of the  Framework and then we integrated them in a flow to form a Keyword Driven Framework architecture, in our next post we would be creating each of these individual components to get a workable copy of the “Keyword Driven Framework

n

Understand Keyword Driven Framework by using UFT – (Part 2)
nUnderstand Keyword Driven Framework by using UFT – (Part 3)
nHybrid Framework!!
n
nDo follow us on Fb,G+,Twitter for more topics.

Was this article helpful?
YesNo

Similar Posts