Wednesday, February 2, 2011

QTP FAQ 3

Through exception handling we can implement error handle.In QTP we have four types of exception handles.

we can call the function as below

function functionname (parameter1,parameter2,....)

end function

When QTP cannot recognise an object with its mandatory and assistive properties, at this point Smart identification mechanism is used, where QTP identifies objects with the help of Base Filter properties and Obligatory properties.Smart identification has to be enabled before u record the script.u will also notice a black hat in the test results for the objects identified using smart identification.The properties depend on the object and its env. Say u want to use smart identification for a dialog box in std windows env, then we select properties (while enabling smart identification)- is child window, is owned window, native class, object class.
To do database testing manually means doing it at the backend using sql (or any query language)statements directly on the tables and retreiving the data, this is my view if i am wrong then anybody is free to correct it.
QTP uses the Object Repository file to recognize objects on the application. When QTP runs a action, it uses the Object Repository to locate objects. It reads an object?s description in the Object Repository and then looks for an object with the same properties in the application being tested


QTP creats object repository of of it's own,in that it record all the properties for the identification of test application and generate test script of reusability.In test script it map the object properties with object repository.when we run the our script QTP map/search the properties of corresponding object .this is the simple concept of " how QTP identifies object"
.Declaration of Variables with proper bizness naming conventions

2.Initializations,Constants

3.Non-Reusable scripts with User defined Functions

4.Reusable scripts

5.Exception handler.



If you are asking about the coding standard that is used in QTP's Script then it means

In the QTP Header section you have to declare that is

***Header Section of the QTP you have to Mention*****

1.Name of the Script

2.Name of the Test case

3.Name of the Reusable scripts

4.Path of the Excel sheet

5.Version

6.Name of the Tester

7.Change History

*******************************

Then you have to follow Naming convention for each of the script that you will create in QTP.Like Y_TRA_AGIALANT_FINANCE_01

*******************************

You have to follow coding standards for the variable that you will declare in the QTP script

Like For all the

Integer type variable the name should start like Dim IntCount

Character type variable the name should start like Dim CharName

Boolean type variable the name should start like Dim BooTrue

String Type variable the name should start like Dim StrName

*****************************************************

Then throughout the QTP script you have to mention that what you are doing actually.

Like

**Here you have to mention in the script what you are doing **

Like

**Clicking the yahoo signin button to Login **********

Browswer(Yahoo page).Page(Yahoo_1).Button(Sign_in).Click

*************************************************

PLZ SEE  QTP FAQ 1
PLZ SEE  QTP FAQ 2

No comments:

Post a Comment