In this article, we discuss about concepts of object Repository in QTP by subjective and multiple choice questions. Your suggestions are most welcome if I missed on anything in this article related to object repository.
Question 1: What is object Repository?
Answer: Object repository is a repository where
collection of objects with identification properties are saved. Objects in an
object repository are stored in a tree structure. E.g. a WebEdit object in
object repository will have parent as Page, and page will have a parent
browser. So for a browser object, we can have multiple page objects, and inside
a page object we can have multiple web edit boxes. Object Repository stores
objects and checkpoints.
Understanding Object repository Window |
Question 2: Where can we see the object repository Window in UFT 11.5?
a. By clicking CTRL+R
b. Navigating to Resources>Object Repository
c. Navigating to Tools>Object Identification
d. By clicking CTRL+A
Answer: To view Object Repository window, Navigate to
Resources>Object Repository or Click CTRL+ R. So option a) and b) are
correct
Question 3: Explain various menu items in the Object Repository Window?
Answer: The various menu items in Object Repository Window:
File:
File menu provides option to export object from local repository to a
shared repository. When we learn object, objects are associated with an object
repository for the particular Action and not be used by other actions. To use
the same objects in other actions/ tests, we need to create shared OR. A shared
OR is created by exporting objects from local repository. When we export local
objects using File>Export Local
Objects, a shared object repository is created at location defined. Instead
if we use File>Export and Replace
local objects, local object repository is removed, and a shared repository
with action with all the local objects
Adding a new test object |
Edit: Provides option to cut, copy, find,
replace, or delete an object in repository.
Object: Object Menu allows us to do following
tasks:
a.
Define New Test Object – A new test object can
be created based on environment, object class, and properties defined by user.
This is useful in case the properties of object yet to be created by developer
are known to tester.
b.
Adds object to local – Allows to add objects
from application to repository
c.
Update object from application – this allows to
update object properties for an object in repository with the properties of
selected object from application
d.
Add Insight Object to local – This adds insight
object to the repository by user. An Insight object similar to other objects
can be added during recording as well as manually by learning through
application.
e.
Copy to Local – An object from associated shared
object Repository can be copied to Local using Copy to Local.
View: Allows user with following tasks:
a.
Compact view – Provides user option to view the
object repository in compacts (Object Properties are not displayed in compact
view)
b.
Highlight in Application – this feature
highlights the selected object in application and helps user know object is
available
c.
Locate in Repository – This is to verify object
in application is already available in repository.
Tools: Provides following tools to the user:
a.
Object Spy – One of the first of features of QTP
that we use in QTP to identify object properties is Object Spy. We can view the
native properties and test object properties for an object and available
methods based on object class.
b.
Associate Repositories– We can associate
repositories with the action using associate repositories.
c.
Delete Insight Objects
Help: Provides help on object repository window
Question 4: Which of the following are types of Object Repository?
a.
Local Repository
b.
Shared Repository
c. Global Repository
d.
Test Repository.
Answer: Local Repository and shared Repository are types of
object repository. When we record on an application, or learn objects, objects
are stored in the object repository specific to the action in which we learn or
record in the application. This repository is known as Local Repository as is
specific to the action. If we want to use same object in multiple test/action,
we should use shared object repository.
When we export local object as
explained in file section of Answer 3), a shared repository is created, We can
merge object Repositories to form a large shared object Repository using Merge
Object Repository feature in Object Repository manager. Shared Object
repository can be used in multiple actions by associating the repository with
action
Question 5: We have associated different shared repositories and have some local object. How can we view object from local repository only in object Repository window?
a.
Compact View shows only local objects in the
repository
b.
We cannot distinguish between Local and shared
repository object.
c.
Local objects are editable in Object Repository
Window whereas objects from shared repository are non-editable and are
displayed lighter/fade in color compared to Local object
d.
Using Filter from Pane to filter objects from
different repositories
Answer: Option c.) and d.) are correct, Local objects are
editable in Object Repository Window whereas objects from shared repository are
non-editable and are displayed lighter/fade in color compared to Local object. Using
Filter from Pane to filter objects from different repositories as shown below:
Question 6: What is the extension of a Shared object repository in QTP?
a.
.tsr
b.
.qrs
c.
.mts
d.
.tsp
Answer: Extension of a shared repository file is .tsr. qrs
is extension for recovery file, .tsp is extension for a test, and .mts stores
the script of an action
No comments:
Post a Comment