Flag This Hub

qtp framework

By


Automation Framework


For more Information on QTP, Visit: www.gcreddy.com

Automation:

Accessing one s/w objects from another s/w is called automation.

(AUT is one s/w and testing tool is another s/w.)

Automation Framework:

It is a set of guidelines, assumptions and process developed by experts in order to perform a task(s) in an effective, efficient and optimized way.

A systematic approach for automating s/w.

Why Automation Framework:

In one project test automation we use various files, we perform various tasks, in order to organize and manage them all, a systematic approach (Automation Framework) required.

(files to be used:

Flat files (.txt),

Excel files (.xls)

Object repository files (.tsr)

XML files (.xml)

Library files (.vbs)

Test Scripts (.mts)

Recovery scenario files (.qrs) Etc…)

(Tasks to be performed:

Test Planning,

Test script generation,

Enhancing tests,

Parameterization,

Synchronization,

Error handling,

Scripts optimization,

Entering regular expressions,

calling functions and /or Actions,

batch execution,

defining and exporting test results)

Types Of Automation Framework:

Automation Framework is not a qtp feature, it’s a 3rd party concept. And this is purely local concept.(framework may vary from one company to another)

1. Record/Playback or Linear Framework (1st generation framework).

2. Modular Framework.

3. Data Driven Framework

4. Keyword Driven framework

5. Hybrid Framework

In the above frameworks Keyword Driven framework is very famous in the industry.

Keyword:

1. Any word used as the key to a code

2 A reserved word used to identify a specific command, function etc.

(in our test automation example keywords are :

Test Objects,

Functions(built-in and user defined ),

Methods,

Statements etc)

Keyword Driven Approach:

In this approach we use keywords for preparing tests. First we create tests and make them as functions, through framework we execute them and generate results.

Key elements of Automation Framework:

  1. Well defined folder structure
  2. initialization script
  3. Driver script
  4. input data spreadsheet
  5. process guidelines document

Why folder structure?

In order to create, store, organize and manage files a well defined folder structure required. Folder structure is a mandatory element of any framework, but folder names may vary from one framework to another and company to another .

Folder Structure:

1. Object Repository

2. Environment

3. Library

a) Company

b) Project Specific

4. Test data

5. Test log

6. Recovery scenarios

7. Miscellaneous

And

  1. Initialization script (.vbs file)
  2. Driver script (QTP Script file)

1) Object Repository: In this folder we store object repository files(.tsr), all team members can use this repositories.

2) Environment: In this folder we store environment variables files(.xml), all team members can use this variables.

3) Library:this folder contains two sub folders one is for storing common functions of our company, another folder for storing our project specific functions(.vbs).

4) Test Data: in this folder we store test data required for data driven testing, for that we use either .xls files or .txt files or .mdb files.

5) Test Log: In this folder we store test result(excel sheet).

6) Recovery scenarios: In this folder we store qtp recovery scenarios files(.qrs).

7) Miscellaneous: in this folder we store the files other than above files(ex-process guideline doc and messages among team members and instructions by team lead etc).

And

1Initialization script (.vbs file):it launches qtp tool and calls driver script, at end it closes qtp tool.

2.Driver script (QTP Script file):it is only the qtp script, we can associate all resources to this script(ex)

For more Information on QTP, Visit: www.gcreddy.com

Comments

http://www.gcreddy.com/ 2 years ago

Visit gcreddy.com for more Information on QTP Tool

Vishal SIngh 2 years ago

Hi Sir,

I want a QTP Framework where i can write scripts in Excel file and can execute by QTP or directly from Excels or from QC.

Please can you send me such Framework.

Thanks & Regards

Vishal Singh

Vishal Singh 2 years ago

Sir My Email Id is vishal4686@gmail.com

Vijay 23 months ago

This is very good article on Automation framework

VJ 21 months ago

I need a Keyword Framework for QTP where i can write scripts in Excel file and can execute by QTP or directly from Excels or from QC.

Please can you send me such Framework.

Email ID :-- v2jhello@rediffmail.com

Regards

Vijay

Maxx 21 months ago

Hi Sir,

Thanks for your kind article. Can you send me some sample code of a framework and what docs should i deliver while giving the framework.

my id

: maxxmine@yahoo.com

Radha 20 months ago

It is a very good article to learn Automation Framework

Edison 20 months ago

It is very good explanation on Automation Framework design & Implementation, and it has been written in easy method. If you can share driver script and Initialization script, will be helpful for Software Testers

kailash 19 months ago

I need QTP code (Data driven) that retrieve data from .xls and print the result in same .xls

Thanks

Kailash [kailashpathak@gmail.com]

Venkat Murthy 19 months ago

It is very useful explanation for Automation testers to understand & design Automation Framework using QTP Tool. You share Driver script and Initialization script.

Thanks in advance

Venkata Ramana 17 months ago

It is a nice article on QTP Framework, but some more clarity is required on driver script and Initialization script. Anyhow it is useful for Software Testers as well as developers.

Guest 17 months ago

Kailash,

Please collect from me the QTP code

NP

ramana 17 months ago

It nice some more explanation required

prasad 16 months ago

How can i store the test result of QTP excel sheet with proper column like test case name , test step , status (pass/ fail) etc....??? is there any QTP script for this...???

Bhanu Kiran 16 months ago

It is a nice post on Automation framework design & implementation. Give examples for Driver script and Initialization script

Pranit Das 15 months ago

Hi,

I want to make an automationframework using qtp..need help..

mail me at pranit.das@gmail.com

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working