Keyword driven framework architecture in QTP -Bibek



Framework:A hypothetical description of a complex entity or process-Word Web.
Here, word hypothetical makes it clear that it’s based primarily on surmise rather than adequate evidence.There are no rules and standards on test framework development.It varies from organization to organization and from team to team.Project internal architecture provides a great source of information for organizing the components of our framework.Testing components needs to be well organized to accomplish the task effectively,efficiently and in a systematic order.
We need to develop framework in a way that leads to accomplish the task without much human intervention.The heart of “Keyword driven test automation framework” is common functions that resides within the function library and the keyword acts as  it’s brain.Framework must be enough flexible to run with the desired keyword from the pool of available keywords.
well,It’s been my passion to play with electronic chips since my childhood.I can even survive in desert if i get electronic scarps and a screwdriver ;) Hence,I decided to develop a flexible framework looking at the architecture of RADIO that have been rusted on my bedroom for years.
The component used & it’s analogy with RADIO:
QTP has it’s own limitation for loading resources;as it does not allow to load .QRS file in run time,here,it goes off the track from radio tuning mechanism.Once radio is turned on we tune to different stations and adjust it’s volume and rotate/pull up-down it’s antenna to have a clarity.
Here we do just opposite, we first do the appropriate setting and proceed with further run.
How keyword driven framework works:
1.Plug in to environment.
2.Do a little bit settings on test_environment setting file;eg,paths of resources,email configuration,project url,expected time etc.
3.Search & Select appropriate generic keywords from keyword pool.
4.Go
Radio analogy:
1.Plug in to switch board.
2.Search for station
3.Set the volume and adjust the antenna
4.Turn on.
(normally 4 comes before step 2)
1.. 2 …3… Go……..! that’s it.
Details of the Component Architecture are as follows: [Note:the architecture is based on my own assumption(analogy with RADIO),if you find it uncomfortable,kindly scold me :) with your invaluable suggestions]
Keyword driven framework architecture in qtp
1.Start.Exe: Starts the tool using AOM and pass the control to Driver.
2.Application Scenarios: Test plan,test case and test steps.
3.Test Object Description: Pool of test object properties and description.
4.Resources: Repository files for application dependent functions.
5:Mytest: Driver script resides.
6: Session manager: manages the session of the test run & helps in recovery if run is unsuccessful due to some unforeseen events.
7.Test Environment_Config settings: Test run settings. (application specific)
8.Func Library: Common functions and application dependent functions separately.
9:Recovery Files: .QRS or custom recovery functions.
10:Run Results: Application run results.
11:Help files: help files and framework documentations.
Following are my tweets so far (on framework development):
Automation framework rule #1:If it’s not simple, it won’t work! if it’s simple it’s fun to use.
Automation Framework rule #2:Achieving 100% automatic tests is an unreachable goal,never dream it.
Automation framework rule# 3:Make it easier to discover the errors that occur.
Automation Framework Rule #4:Focus on stability;the more stable the design, the lower the maintenance cost.
You must have realized as of now  that framework is just a wrapper around complex internal architecture to have
a great drive with less interruption.Let turn on your radio coz you need not to know how it’s playing.Stakeholders
should play with our flexible framework  just as we tune/play our radio.
For more interesting stuff on QTP :

Source: QTP Lab:- A touch of madness!

Comments

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?