Object Repository in QTP

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 6

Object repository in QTP

Author- Neelkanth
http://quicklearnqtp.blogspot.com
Object repository in QTP

Object repository is the heart of QTP, if you


don’t understand it properly than you will face
lots of problems in developing and testing of
your application.
Object repository in QTP
- Test objects can be saved in two types of object repository
Local object repository and Shared object repository

- A local object repository stores objects in a file that is associated


with one specific action, so that only that action can access the stored
objects

- A shared object repository stores test objects in a file that can be


accessed by multiple tests.

-When you want to create test (New project) you have two ways to
store the objects in your test.
-http://quicklearnqtp.blogspot.com
- Store the objects in corresponding local object
repository OR
- Store the objects in one or more Shared object
repository. (Smart ,advanced and efficient way)
because it reduces maintenance and enhance
reusability of your tests.
Object repository concept:

- In testing the most efficient way to save objects is in shared object repository.
- You can use the same shared object repository for multiple actions, if the
actions include the same object.
- If an object with the same name is located in both the local object repository
and in a shared object repository linked with the same action, the action uses
the local object repository first.
- If an object with the same name is located in more than one shared object
repository linked with the same action, the first occurrence of the object will be
used by action.
- You can see window which is the Object Repository window (Resource-
>Object Repository or CTRL+R) in which you can see all objects of local and
shared object repository.
http://quicklearnqtp.blogspot.com
- In Left side of the window, black text shows objects of
local object repository
- Gray text shows objects of shared object repository.
- This figure I have taken from help of QTP, in which
you can see the object detail of “buyFlights” on the left
hand side.
- You can view all objects of QTP (local and shared)
and you can also modify its property according to your
requirements of application.
- You can copy objects from shared repository to local
repository.
-This is the basic concept of Local and shared object
repository if you want more detail on object repository
you will find it in help of QTP.
-http://quicklearnqtp.blogspot.com

You might also like