Wednesday, July 18, 2007

QTP Framework

The framework requires the creation of Repository files, Recovery Files, Library Files (Reusable Functions or user defined functions), XLS files

1. Repository files are created Test manager or test lead or senior S/W engineer.
So we have to add or load or executes these repository files using within a script or using QTP tool.

2. After loading the repository file, then the library files are loaded dynamically into the scripts.
This library file contains functions & sub procedures & verification checks, reports.
Then these files are loaded dynamically into the test in two ways:
[a] before creation of library files we creates a functions(just record the functionality of the app and mention the function name at first and copy the script and paste into notepad and save as .vbs extension and save this a folder which we want to create at first and give the folder name as Re_Usable_Functions) .
Then if u want to make this file as reusable then go to Test tab and select Test settings-select Resource tab &click + button & browse the location of the VBScript® file which u stored in Re_Usable_Functions folder. Then this function is reusable you can use this file with that function name like: function ().
[b] loading library file at runtime u can use the statement-Execute File ("full path of the file which u stored in a folder").

3. XLS files-the functionality (data within a fields) of the app under test(AUT) is documented in a Data Table.
This Data Table contains test data for a particular screen fields and this data tables are loaded onto scripts manually.
Advantage:-so whenever the app data is changed, we don’t want to change the script just we have to change the data within the data table.
I am sending a script which contains how we develop datatable within a script.

4. Recovery Files-Recovery files are created using "Recovery Scenario Manager".
These files r used for an unexpected event or error occur within a run session and the recovery operation is necessary.
At first we understand the app functionality and we want to guess that what types of errors are occur during the script execution.
ex:-some times if there is misspelled data is entered within a field then a pop-up window will open and says "enter appropriate data ",so we want to create file for this using "Recovery Scenario Manager", in this 1]trigger event 2] Recovery Operation and 3] post recovery test run.
After this we enter with "scenario name” and save this in "Recovery_files" folder which we want to create at earlier stage like re_uasable_func folder.
Then select Test tab-Test Settings-Recovery tab and add recovery file which is saved in "Recovery_files" folder with scenario name.
Next execute this file whenever u want within a script using few functions like:
-declare a variable (ex-rep)
Variable = Recovery.GetScenarioPosition (Scenario File, Scenario Name)
Recovery.Set Scenario Status (variable, Status)
Status=True or False
Recovery.Activate
Then this file is executed whenever this particular error occurs.
and also use OnErrorResumeNext function also used. just got to built-in functions.

This is the one type of frame work. We called it as Master FrameWork or Action FrameWork. So if u needs any information regarding QTP framework and about QTP automation u just mail me.

5 comments:

Anonymous said...

good info

prasadgali said...

hi Vaibhav,

u gave good information. I will be pleased if u give information on keyword driven testing.

My mail id is hellogali@yahoo.co.in

Thanks & Regards

Prasad Gali

Unknown said...

Good information :)
Can you please provide an example of
Keyword Driven framework.

Thanks & Regards--
Amar

Anonymous said...

Buy Endress & Hauser models at up to 20% discount from list price

Endress+Hauser is a leading supplier of measuring instruments and automation solutions for the industrial process engineering industry.

Endress+Hauser is recognized as a leading supplier of industrial measurement and automation equipment, providing services and solutions for industrial processes all over the world. Endress+Hauser offer comprehensive process solutions for flow, level, pressure, analysis, temperature, recording and digital communications across a wide range of industries, optimizing processes in regards to economic efficiency, safety and environmental protection.

As major stockists of many Endress and Hauser level instruments, We [url=http://www.endress.org.ua]official distributor Endress+Hauser in Ukraine[/url], can offer a range of Endress & Hauser models at up to 20% discount from list price - prices usually only available when buying in bulk.

Feel free to contact us.

QPT said...

Very good useful info!!!
qtp ebook