Qtp object repository descriptive programming and beyond
1 / 29

extending qc with open test architecture ota api - PowerPoint PPT Presentation

  • Uploaded on

QTP: Object Repository, Descriptive Programming and Beyond. Prepared by: Igor Gershovich. Object Repository vs. Descriptive Programming –what to use?. There really is no “best way”

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'extending qc with open test architecture ota api' - Olivia

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Qtp object repository descriptive programming and beyond l.jpg

QTP: Object Repository, Descriptive Programming and Beyond

Prepared by: Igor Gershovich

Object repository vs descriptive programming what to use l.jpg
Object Repository vs. Descriptive Programming –what to use?

  • There really is no “best way”

  • Use the method that gives your company the best ROI, whether that be Object Repository (OR), Descriptive Programming (DP) or a mixture of both

Or pros and cons l.jpg
OR Pros and Cons use?


  • GUI Front end to examine all the objects in the repository

  • Highlight in Application feature is great tool to walk the object tree

  • No need to modify the script when object properties changes

  • Easy to identify objects in AUT by Object Logical names

  • Can be created independently from scripts

Or pros and cons4 l.jpg
OR Pros and Cons use?


  • Additional layer to maintain

  • Unnecessary objects can be created

  • Multiple users cannot concurrently save/write to the shared OR

  • It won’t eliminate the need for Descriptive Programming in most of cases

Dp pros and cons l.jpg
DP Pros and Cons use?


  • It’s a white box

  • Compatible with different QTP versions

  • Code portability is high

  • Easy to mass update

Dp pros and cons6 l.jpg
DP Pros and Cons use?


  • Lower Code Readability and requires more comments, like “what object is accessed”

  • Potentially slower to create

  • To highlight an object in the application requires utilizing the “Highlight” method

What is object repository l.jpg
What is Object Repository? use?

  • Object Repository is a place where QTP stores learned objects

  • QTP uses default Object Identification properties: mandatory and assistive to learn objects into OR

Object repository l.jpg
Object Repository use?

Logical Name


Script playback using or l.jpg
Script playback using OR use?

  • QTP finds the Object in Object Repository using object Logical Name and Object Hierarchy

  • QTP retrieves Test Object properties from OR

  • QTP searches actual application for the Object with the same properties as the OR Test Object and performs user action

Script playback using descriptive programming l.jpg
Script playback using Descriptive programming use?

  • QTP searches the Application Under Test (AUT) for the Object using Descriptive properties and performs user action

Descriptive programming when and why l.jpg
Descriptive programming – when and why? use?

Consider using DP in following cases:

  • Dynamic object properties

    Example: Link Logout <User Name>

  • Same objects on every page

    Example: Buttons – Next, Back, Cancel, OK

  • Lots of similar objects on one page

    Example: table with many First & Last name text boxes

Different ways to work with objects14 l.jpg
Different ways to work with objects use?

Example for Passenger 1 First Name

Childobjects method using collection object16 l.jpg
ChildObjects method – using Collection Object use?

Last Name fields are populated

To ro and object l.jpg
TO, RO and .Object use?

  • .GetTOproperty/SetToProperty refers to the properties stored in OR

  • .GetROProperty property refers to the AUT Object property (Run-time)

  • .Object.<property/method> refers to the AUT Object NATIVE properties/methods

Better names for object spy radio buttons l.jpg
Better names for Object Spy radio-buttons use?

Run-Time NATIVE Object

Run-Time QTP (Test) Object

Test object properties from or set gettoproperty l.jpg
Test Object Properties from OR (.Object)Set/GetToProperty

Regular expressions in or example server independent page object l.jpg
Regular Expressions in OR (.Object)Example: Server independent Page object

1. Click on Property value to access RegEx

2. Click RegEx Icon

Regular expressions in or24 l.jpg
Regular Expressions in OR (.Object)

RegEx icon

Object smart identification l.jpg
Object Smart Identification (.Object)

  • Smart Identification is not Artificial Intelligence

  • SI uses loose/unreliable object recognition

  • It’s recommended to disable SI for each and every page/window/control using the Tools->Object Identification dialog (Recording)

  • Another way to disable SI: File -> Settings -> Run -> Check the "Disable Smart Identification during run session" check box (Run-Time)

Resources l.jpg
Resources (.Object)

  • QA Forums – www.sqaforums.com

  • HP/Mercury QTP User guide

  • Knowledge inbox (by Tarun Lalwani) - http://www.knowledgeinbox.com/

  • Microsoft TechNet - http://www.microsoft.com/technet/scriptcenter/

Igor gershovich l.jpg
Igor Gershovich (.Object)

  • E-Mail: [email protected]

  • Phone: 720-933-9395

  • www.connectedtesting.com