Innovation Group Global Solutions
QTP Object test model
Object Repository
•Object in QTP
•Types of objects
•Object Identification properties
•Object Identification modes
•How QTP learns about an object
•Object identification process workflow
•Introduction of Object Repository
•Ways to add object in QTP
•Types of Object Repository
•Object hierarchy
Contents
Strictly Private & Confidential - © 2013. All Rights Reserved.
3
Object:
Actual representation of various fields and control used to build the user
Interface of a Software application. (For example, text box, field, radio
buttons)
Main types of Object:
• Test Object
•Run Time Object
Other Objects
•Virtual Objects
Strictly Private & Confidential - © 2013. All Rights Reserved.
4
Test Object:
Test object is an object , QTP creates in test to represent actual objects in
application.
Purpose:
QTP uses this information( properties & Methods) for object identification
during run session
Run Time Object:
Actual Object in application , on which methods are performed during run
session.
Purpose:
QTP reserved objects used for Testing and Result reporting
Virtual Object:
virtual object is an object that is recognized by QTP as non-standard but is
instructed explicitly to behave like a standard object.
Strictly Private & Confidential - © 2013. All Rights Reserved.
5
Strictly Private & Confidential - © 2013. All Rights Reserved.
6
Difference between property and action
Property:
•Store data for an object.
Method
• An action that object can perform.
Object Identification properties
1. Mandatory
2. Assistive
3. Ordinal identifier
4.Visual Relation
Purpose of properties
1. QTP forms Test Objects
2. QTP identifies the object in application
Strictly Private & Confidential - © 2013. All Rights Reserved.
7
Strictly Private & Confidential - © 2013. All Rights Reserved.
8
Mandatory Properties:
• Properties that are always recorded when QTP learns an object.
Assistive Properties:
•These are optional properties.
•QTP adds these properties one by one, until a unique description.
•If these properties are not sufficient then Ordinal Identifier is used.
Learned Description:
Combination of Mandatory & Assistive Properties is known as (Learned
Description)
Strictly Private & Confidential - © 2013. All Rights Reserved.
9
Ordinal Identifier:
•Ordinal identifier assigns the object a numerical value that indicates its
order relative to other objects with an otherwise identical description.
•Enables QTP to create a unique description.
•Three types are there : Create time, index, location
Visual Relation Identifiers:
Helps to identify application object based on its neighboring objects
Strictly Private & Confidential - © 2013. All Rights Reserved.
10
Object Identification Window :
Normal Identification mode
• Mandatory , Assitive and Ordinal properties are used
Smart Identification mode
• smart identification mode must be enabled for the test
• Two main filtres
1: Base Filter Properties
2: Optional Filter Properties
Object Identification modes
Strictly Private & Confidential - © 2013. All Rights Reserved.
11
Strictly Private & Confidential - © 2013. All Rights Reserved.
12
How QTP learns objects:
• QTP looks at object being learned, stores it as test object.
•Determines Test object class.
•Considers Identification properties. (Mandatory Properties, Assistive
Properties, Ordinal Identifier)
Strictly Private & Confidential - © 2013. All Rights Reserved.
13
How QTP identifies Object at run time:
• At run time, QTP identifies an object using learned description.
•If object is not identified using learned description, Smart Identification is
used.
•If object is not identified using Smart Identification, Learned description +
Ordinal identifier is used.
•Visual and Ordinal cannot be used altogether
1: Learned description
2: Visual identifier
3: Smart identification
4. Ordinal identifier
Object Identification Process Workflow
Strictly Private & Confidential - © 2013. All Rights Reserved.
14
Strictly Private & Confidential - © 2013. All Rights Reserved.
15
Object Repository :
Storage place of QTP to store object information .
1. Define Test Object
2. Object spy
3. Navigate and Learn
4. Record and play
Ways to Add objects to Object repository
Strictly Private & Confidential - © 2013. All Rights Reserved.
16
Local Object Repository (LOR)
Local Object Repository is the default object repository
It is specific to actions and can be used only for a particular action
Shared Object Repository (SOR)
Global or Shared Object Repository is preferable when application is
dynamic and object description change frequently
Types of object repositories
Strictly Private & Confidential - © 2013. All Rights Reserved.
17
Strictly Private & Confidential - © 2013. All Rights Reserved.
18
Object Hierarchy :
• QTP uses a Tree-Hierarchy to store objects.
Container Object
• An object that can potentially contain a lower-level object is called a
container object
• All top-level objects in the object hierarchy are container
objects.
• Browser.Page.Edit.Set "David", Browser and Page are both container
objects.
Object hierarchy
Strictly Private & Confidential - © 2013. All Rights Reserved.
19
Strictly Private & Confidential - © 2013. All Rights Reserved.
20
Thank you!

Presentation-Session3

  • 1.
    Innovation Group GlobalSolutions QTP Object test model Object Repository
  • 2.
    •Object in QTP •Typesof objects •Object Identification properties •Object Identification modes •How QTP learns about an object •Object identification process workflow •Introduction of Object Repository •Ways to add object in QTP •Types of Object Repository •Object hierarchy Contents
  • 3.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 3 Object: Actual representation of various fields and control used to build the user Interface of a Software application. (For example, text box, field, radio buttons) Main types of Object: • Test Object •Run Time Object Other Objects •Virtual Objects
  • 4.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 4 Test Object: Test object is an object , QTP creates in test to represent actual objects in application. Purpose: QTP uses this information( properties & Methods) for object identification during run session Run Time Object: Actual Object in application , on which methods are performed during run session. Purpose: QTP reserved objects used for Testing and Result reporting
  • 5.
    Virtual Object: virtual objectis an object that is recognized by QTP as non-standard but is instructed explicitly to behave like a standard object. Strictly Private & Confidential - © 2013. All Rights Reserved. 5
  • 6.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 6 Difference between property and action Property: •Store data for an object. Method • An action that object can perform.
  • 7.
    Object Identification properties 1.Mandatory 2. Assistive 3. Ordinal identifier 4.Visual Relation Purpose of properties 1. QTP forms Test Objects 2. QTP identifies the object in application Strictly Private & Confidential - © 2013. All Rights Reserved. 7
  • 8.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 8 Mandatory Properties: • Properties that are always recorded when QTP learns an object. Assistive Properties: •These are optional properties. •QTP adds these properties one by one, until a unique description. •If these properties are not sufficient then Ordinal Identifier is used. Learned Description: Combination of Mandatory & Assistive Properties is known as (Learned Description)
  • 9.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 9 Ordinal Identifier: •Ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description. •Enables QTP to create a unique description. •Three types are there : Create time, index, location Visual Relation Identifiers: Helps to identify application object based on its neighboring objects
  • 10.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 10 Object Identification Window :
  • 11.
    Normal Identification mode •Mandatory , Assitive and Ordinal properties are used Smart Identification mode • smart identification mode must be enabled for the test • Two main filtres 1: Base Filter Properties 2: Optional Filter Properties Object Identification modes Strictly Private & Confidential - © 2013. All Rights Reserved. 11
  • 12.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 12 How QTP learns objects: • QTP looks at object being learned, stores it as test object. •Determines Test object class. •Considers Identification properties. (Mandatory Properties, Assistive Properties, Ordinal Identifier)
  • 13.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 13 How QTP identifies Object at run time: • At run time, QTP identifies an object using learned description. •If object is not identified using learned description, Smart Identification is used. •If object is not identified using Smart Identification, Learned description + Ordinal identifier is used. •Visual and Ordinal cannot be used altogether
  • 14.
    1: Learned description 2:Visual identifier 3: Smart identification 4. Ordinal identifier Object Identification Process Workflow Strictly Private & Confidential - © 2013. All Rights Reserved. 14
  • 15.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 15 Object Repository : Storage place of QTP to store object information .
  • 16.
    1. Define TestObject 2. Object spy 3. Navigate and Learn 4. Record and play Ways to Add objects to Object repository Strictly Private & Confidential - © 2013. All Rights Reserved. 16
  • 17.
    Local Object Repository(LOR) Local Object Repository is the default object repository It is specific to actions and can be used only for a particular action Shared Object Repository (SOR) Global or Shared Object Repository is preferable when application is dynamic and object description change frequently Types of object repositories Strictly Private & Confidential - © 2013. All Rights Reserved. 17
  • 18.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 18 Object Hierarchy : • QTP uses a Tree-Hierarchy to store objects.
  • 19.
    Container Object • Anobject that can potentially contain a lower-level object is called a container object • All top-level objects in the object hierarchy are container objects. • Browser.Page.Edit.Set "David", Browser and Page are both container objects. Object hierarchy Strictly Private & Confidential - © 2013. All Rights Reserved. 19
  • 20.
    Strictly Private &Confidential - © 2013. All Rights Reserved. 20 Thank you!