0% found this document useful (0 votes)
93 views

Module 11 Utilizing A Shared Object Repository

This document discusses object repositories in Unified Functional Testing (UFT), including: 1) There are two types of object repositories - shared object repositories which contain objects that can be used across multiple actions, and local object repositories which contain objects specific to a single action. 2) Shared object repositories allow for test object maintenance to be reflected across all actions/tests using that object, while local repositories are only accessible within their associated action. 3) When recording or learning objects, UFT automatically saves them to the local repository of the associated action by default, but objects can also be stored in shared repositories.

Uploaded by

Mashiro Shiina
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

Module 11 Utilizing A Shared Object Repository

This document discusses object repositories in Unified Functional Testing (UFT), including: 1) There are two types of object repositories - shared object repositories which contain objects that can be used across multiple actions, and local object repositories which contain objects specific to a single action. 2) Shared object repositories allow for test object maintenance to be reflected across all actions/tests using that object, while local repositories are only accessible within their associated action. 3) When recording or learning objects, UFT automatically saves them to the local repository of the associated action by default, but objects can also be stored in shared repositories.

Uploaded by

Mashiro Shiina
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

CS-6306 UNIFIED FUNCTIONAL TESTING Page|1

Utilizing a Shared Objects Repository

Module 011 – Utilizing a Shared Object Repository

“Quality is never an accident; it is always the result of intelligent


effort.”
– John Ruskin

Overview of the Course

At the end of this module, you should be able to:


 Create basic scripts from a manual test case
 Enhance basic tests with synchronization and verification
 Parameterize tests to run with multiple sets of data

 Create and reuse modular actions


 Use the Object Repository

 Use debugging tools


 Write custom checkpoints to create more precise
verification points within a test
 Use the Object Repository Manager
 Resolve object recognition problems

Researching beyond the coverage of this module is highly


encouraged to supplement your understanding of the topics
covered. Always, think and see beyond the box.

The citation provided is a guideline. Please check each citation


for accuracy before use.

So, what are we waiting for? Let us now explore the Unified
Functional Testing 12.0
CS-6306 UNIFIED FUNCTIONAL TESTING Page|2
Utilizing a Shared Objects Repository

Module Objectives:

After completing this module, you should be able to:


 Identify the types of object repositories
 Manage shared object repositories using the Object Repository
Manager
 Use visual relation identifiers

Object Repositories
Whenever you create a test, it involves capturing objects which are
related to the steps you must perform on the AUT. An object
repository is a storage place where all objects relevant to the test
steps are stored. When you execute the test, UFT for GUI Testing
utilize objects stored in the object repository to run the steps.

Types of Object Repositories


When you create an action in a test, UFT for GUI Testing creates a new
local object repository that stores objects used in the action. This local
object repository is the default type of object repository.
When you associate a shared object repository with a new action, the
objects in the shared object repository appear in the object repository.
You can store test objects in local or shared object repositories. A local
object repository stores objects associated with a specific action so that
only that action can access the stored objects. A shared object repository
stores test objects that multiple actions can access in read-only mode.
 Shared object repositories – Contain test objects that can be used
in multiple actions. This versatility makes it the preferred
repository type for storing and maintaining test objects. By
associating a shared object repository with an action, you make
the test objects in that repository available for use in the action.
Any maintenance you perform on an object in a shared object
repository is reflected in all steps (within all actions) using that
object.
 Local object repositories – Contain test objects that can be used in
one specific action. The objects in this type of repository cannot
be used in any other action. Local object repositories are useful
for backing up your test objects, or for learning new objects.

Local Object Repository


When you use a local object repository, UFT for GUI Testing uses
a separate object repository for each action or component. (You can
also use one or more shared object repositories if needed.) The local
object repository is fully editable from within its action or
component.

When working with a local object repository:


 UFT for GUI Testing creates a new (empty) object repository
for each action or component.
 When UFT for GUI Testing learns new objects (either because
CS-6306 UNIFIED FUNCTIONAL TESTING Page|3
Utilizing a Shared Objects Repository
you add them to the local object repository, or you record
operations on objects in your application), it automatically
stores the information about those objects in the
corresponding local object repository (if the test objects do
not already exist in an associated shared object repository).
UFT for GUI Testing adds all new objects to the local object
repository even if one or more shared object repositories are
already associated with the action or component. (This
assumes that a test object with the same description does not
already exist in one of the associated shared object
repositories).
 If a child object is added to a local object repository, and its
parents are in a shared object repository, its parents are
automatically added to the local object repository.
 Every time you create a new action or component, UFT for
GUI Testing creates a new, corresponding local object
repository and adds test objects to the repository as it learn
them.
 If UFT for GUI Testing learns the same object in your
application in two different actions or components, the test
object is stored as a separate test object in each of the local
object repositories.
 When you save your test or component, its local object
repositories (or repository, respectively) are automatically
saved with the test or component. The local object repository
is not accessible as a separate file (unlike the shared object
repository).

When you record a test, UFT for GUI Testing automatically saves the
information about the objects that you record in the local object
repository. UFT for GUI Testing creates separate local object
repositories for each new action.

Shared Object Repository


When you use shared object repositories, UFT for GUI Testing
uses the shared object repositories you specify for the selected action
or component’s application area. You can use one or more shared
object repositories. (You can also save some objects in a local object
repository for each action or component if you need to access them
only from the specific action or component. After you begin creating
your test or component, you can specify additional shared object
repositories. You can also create new ones and associate them with
your action or component. Before running the test or component, you
must ensure that the object repositories being used contain all of the
test objects used in the test or component steps. Otherwise, the test
or component may fail.

You modify a shared object repository using the Object Repository


Manager.
When working with a shared object repository:
 If UFT for GUI Testing learns a test object that already exists
in either the shared or local object repository, UFT for GUI
Testing uses the existing information and does not add the
object to that object repository.
 If a child object is added to a local object repository, and its
parents are in a shared object repository, its parents are
CS-6306 UNIFIED FUNCTIONAL TESTING Page|4
Utilizing a Shared Objects Repository
automatically moved to the local object repository.
 When UFT for GUI Testing learns a test object, it adds it to the
local object repository (not the shared object repository)—
unless the same test object already exists in an associated
shared object repository. (In this case, UFT for GUI Testing
uses the existing information in the shared object repository.)
 You can export objects from the local object repository to a
shared object repository. You can also export the local object
repository and replace it with a shared object repository. This
enables you to make the local objects accessible to other
actions or components.
 If you plan to use shared objects in a test, create a shared
object repository before you create the test. You can use the
shared object repository for multiple tests. Multiple shared
object repositories can store shared objects.

Specify the shared object repositories that you want to use for an
action in a test before you record a test. You can also create new
shared object repositories and associate these repositories with an
action in a test after you record the test.

To open a shared object repository, do one of the following:


 In the Object Repository Manager Main Window, select File ␣
Open.
 You can also open a shared object repository from the Recent
Files list in the File menu.
 From the Solution Explorer, double-click the name of a shared
object repository or right- click and select Open Repository.

Shared Object Repository Maintenance Issue


You can also merge objects from the local object repository
directly to a shared object repository that is associated with the same
action or component. This can help reduce maintenance because you
can maintain the objects in a single shared location, instead of
multiple locations.

If more than one person is allowed to change logical names in a


shared object repository, subsequent tests might fail because the
tests use obsolete object names. For example, if users Joe and Mary
change the original logical name of the OK button stored in the object
repository to APPOK and FLIGHTOK, respectively, at different times,
the tests created by Joe and Mary will fail.

Therefore, when you use shared object repositories, ensure that


the repositories are managed centrally by an individual or a team. In
addition, ensure that all changes to the shared object repository are
communicated to all concerned people.

Comparing Local and Shared Object Repositories


Deciding Whether to Use Local or Shared Object Repositories
To choose where to save objects, you must understand the
difference between local and shared object repositories. Usually, the
local object repository is easiest to use when you are creating a
simple test.
CS-6306 UNIFIED FUNCTIONAL TESTING Page|5
Utilizing a Shared Objects Repository
Use a local object repository, when:
 You are creating single-action tests.
 You are creating simple tests or components, especially
under the following conditions:
 You have only one, or very few, tests or components that
correspond to a given application, interface, or set of
objects.
 You do not expect to frequently modify object properties.
 You are new to using UFT for GUI Testing. You can record
and run tests or components without creating, choosing,
or modifying shared object repositories because all
objects are automatically saved in a local object
repository that can be accessed by its corresponding
action or component.

Use a shared object repository, when:


 You are creating tests or components using keyword-driven
methodologies (not by recording).
 You have several tests or components that test elements of
the same application, interface, or set of objects.
 You often work with multi-action tests and regularly use the
Insert Copy of Action and Insert Call to Action options.
 You expect the object properties in your application to
change from time to time and/or you regularly need to
update or modify object properties.
 If you are familiar with testing, it is probably most efficient to
save objects in a shared object repository. In this way, you
can use the same shared Object Repository for multiple
actions or components—if they use the same objects.

Object When the objects in your application change, you can update
them in one location for all the actions and components that use this
shared object repository. Information that applies to many actions or
components is kept in one central location.

Using the Object Repository Manager


The Object Repository Manager enables you to open multiple shared
object repositories and modify them as needed. The options available
when specifying property values for objects in shared object
repositories are different from those available when specifying
properties for objects in local repositories.

When you work with the Object Repository Manager:


 You can open as many shared object repositories as you want.
 Each shared object repository opens in a separate document
window. You can then resize, maximize, or minimize the
windows to arrange them as you require to copy, drag, and
move objects between different shared object repositories, as
well as perform operations on a single object repository.
 While the Object Repository Manager is open, you can
continue working with other UFT for GUI Testing windows.
 You cannot add checkpoint or output value objects to a
shared object repository using the Object Repository
Manager. They are added to the local object repository as the
test object they are performed on. You can then upload them
CS-6306 UNIFIED FUNCTIONAL TESTING Page|6
Utilizing a Shared Objects Repository
to the shared object repository, if needed.
 When you choose a menu item or click a toolbar button in the
Object Repository Manager, the operation you select is
performed on the shared object repository which has a
currently active (in focus) window.
 If UFT for GUI Testing is connected to an ALM project with
version control enabled, you can view and manage versions of
your shared object repositories, view comparisons of two
shared object repository versions, and view baseline history.
 Even when steps containing an object are deleted from your
action or component, the objects remain in the shared object
repository.

You can access the Object Repository Manager in either of the


following ways:
 Select Resources ␣ Object Repository Manager.
 In the Solution Explorer, double-click the shared object
repository.

Object Repository Document Window


User interface elements are described in the following table.
Each open object repository contains the following user
interface elements (unlabeled elements are shown in angle
brackets):

Object Details Area (Test Objects)


The Object Details area enables you to view the properties and
property values used to identify a test object during a run session.
CS-6306 UNIFIED FUNCTIONAL TESTING Page|7
Utilizing a Shared Objects Repository
Test Object Image Area (Insight Test Objects)
The Test Object Image area below the Test Object Details area is
available only for Insight test objects.
The Test Object Image area displays the image that UFT for GUI
Testing uses to identify the object in the application. To modify the
image, click the Change Test Object Image button in the title bar of
this area. The Change Test Object Image dialog is displayed. In this
dialog, you can change the test object image and also the default
location to click in the object when performing methods on the
object.

Object Details Area (Checkpoint Objects)


The Object Details area (Checkpoint Objects) enables you to view
the properties of a checkpoint object, the same way as you do in the
relevant Checkpoint Properties dialog box.

Object Details Area (Output Value Objects)


The Object Details area (Output Value Objects) enables you to
view the properties of an output value object, the same way as you do
in the relevant Checkpoint Properties dialog box.

Object Repository Manager Toolbar Buttons


The Object Repository Manager toolbar contains the following
buttons:
CS-6306 UNIFIED FUNCTIONAL TESTING Page|8
Utilizing a Shared Objects Repository

Creating a Shared Object Repository


To create a shared object repository, perform the following steps:
1. 1.Create a new shared object repository file and store it in
Solution Manager.
2. 2.Open a blank test.
3. 3.Select Resources ␣ Object Repository Manager and add
test objects as needed.
4. 4.Select File ␣ Save. The Save External File to Solution
Manager dialog box is displayed.
5. 5.In the File name field, enter the name you want to use
for the shared object repository according to the
naming conventions of the Solution Manager server. For
example, if your Solution Manager server requires
all file names to begin with z, save the file in the following
format:
6. z<filename>. For example: zSOR_dwdm
7. 6.In the File version field, enter the version number you
want to use for the shared object
repository.
8. 7.If a warning message opens, click Yes to create the new
object repository file in Solution Manager.

Adding Objects to a Shared Object Repository


To add objects to an object repository, perform the following steps:
1. In Object Repository Manager, click Add Objects.
2. Select Object in AUT. (When you click on Add Object your
AUT automatically becomes active in your screen.)
3. Select the relevant Object from Tree appearing in Object
Selection dialog box and click OK.

The object will now be added to your object repository.


CS-6306 UNIFIED FUNCTIONAL TESTING Page|9
Utilizing a Shared Objects Repository
Saving an Object Repository
After you create or modify an object repository, you should save
it. To save an object repository:
1. 1.From the Object Repository Manager menu bar, select File
␣Save. The Save Shared Object Repository dialog box is
displayed.
2. 2.Select the folder where you want to save the object
repository.
3. 3.In the File Name field, type the name of the object
repository.
4. 4.Click OK. UFT for GUI Testing saves the object repository
with a .tsr extension.

Associating Shared Object Repositories with Actions


To use shared objects in a test, associate an existing shared object
repository with an action. You associate the shared object repository
by using the Associate Repositories dialog box. The Associate
Repositories dialog box enables you to associate multiple shared
object repositories with multiple actions in a test.

To associate a shared object repository to an action:


1. 1.From the UFT for GUI Testing menu bar, select Resources ␣
Associate Repositories. The Associate Repositories dialog
box is displayed.
2. 2.In the Associate Repositories dialog box, click the Add
Repository button to select and add the repository.
3. 3.In the Available Actions list, select the actions that you want
to associate and move them to the Associated Actions list.
4. 4.Click OK. The shared objects appear in the Object
Repository – All Object Repositories dialog box.

Understanding the Associate Repositories Box


This dialog box enables you to associate one or more shared
object repositories with one or more actions in a test. You can view
the shared object repositories associated to each of the actions in the
current test, and remove object repository associations from selected
actions, or from all actions in the test.

To access, do one of the following:


 In the UFT for GUI Testing main window, select Resources
 Associate Repositories. ␣ In the Object Repository window,
select Tools ␣ Associate Repositories.
 In the Object Repository window, click the Associate
Repositories button.

Important:
 You prioritize the object repositories using the Associated
Repositories tab of the Action
 Properties dialog box (and not the Associate Repositories
dialog box).
 You can associate, remove, prioritize, and view the properties
of shared object repositories in the Solution Explorer.
CS-6306 UNIFIED FUNCTIONAL TESTING P a g e | 10
Utilizing a Shared Objects Repository

Modifying a Shared Object Repository


The Object Repository Manager dialog box enables you to open
multiple shared object repositories and modify them as required. You
can open as many shared object repositories as you need. Each shared
object repository opens in a separate window. You can resize,
maximize, or minimize the object repository windows.

When you open an object repository, it opens in a read-only


format by default. To modify the object repository, you first make it
editable.
To make a shared object repository editable, on the Object
Repository Manager toolbar, click Enable Editing.
After you make an object repository editable, you can modify the
object repository.

Visual Relation Identifiers


When testing applications with multiple identical objects, UFT for
GUI Testing assigns an ordinal identifier to each test object. This can
lead to unreliable object identification. However, it might not
(immediately) result in a failed step.
To improve object identification, you can create a visual relation
identifier, which is a set of definitions that enable you to identify the
object in the application according to the relative location of its
neighboring objects. You can select neighboring objects that will
maintain the same relative location to your object, even if the user
interface design changes. This enables you to help UFT for GUI Testing
identify similar objects much as a human tester would, and helps
create more stable object repositories that can withstand predictable
changes to the application's user interface.
CS-6306 UNIFIED FUNCTIONAL TESTING P a g e | 11
Utilizing a Shared Objects Repository

Defining Related Objects for the Visual Relation Identifier


To access:
1. 1.Open the Object Properties dialog box for the test object
you want to identify, or select it in
the Object Repository window.
2. 2.In the Visual Relation Identifier Settings row of the
Object Repository window or Object Properties dialog
box, click in the Value cell.
3. 3.Click the Browse button in the text box.

Understanding the Visual Relation Identifier Box


User interface elements are described below (unlabeled elements are
shown in angle brackets):
CS-6306 UNIFIED FUNCTIONAL TESTING P a g e | 12
Utilizing a Shared Objects Repository
CS-6306 UNIFIED FUNCTIONAL TESTING P a g e | 13
Utilizing a Shared Objects Repository

References and Supplementary Materials


Books and Journals

Micro. Customized Unified Functional Testing 12.0 Essentials


Student Guide
Hewlett-Packard Development Company, L.P.
http://hp.com/software/education

You might also like