Test objects in object repositories

Relevant for: GUI tests an components

When UFT One learns an object in your application, it adds the corresponding test object to an object repository, which is a storehouse for objects.

When you add an object to an object repository, UFT One:

  • Identifies the UFT One test object class that represents the learned object and creates the appropriate test object.

  • Reads the current value of the object's properties in your application and stores the list of description properties and values with the test object.

  • Chooses a unique name for the test object, generally using the value of one of its prominent properties.

Types of repositories

Objects can be stored in two types of object repositories—a shared object repository and a local object repository.

A shared object repository stores objects in a file that can be accessed by multiple tests or components (via their application areas) (in read-only mode). You can use the same shared object repository for multiple actions or components. You can also use multiple object repositories for each action or component.

A local object repository stores objects in a file that is associated with one specific action or component, so that only that action or component can access the stored objects. The local object repository is automatically created when you create a new action or component.

When you plan and create tests or components, you must consider how you want to store their test objects. You can:

  • Store the objects for each action or component in its corresponding local object repository.

  • Store the objects in one or more shared object repositories. By storing objects in shared object repositories and associating these repositories with your actions or component’s application areas, you enable multiple actions and components to use the objects. Use a combination of objects from your local and shared object repositories, according to your needs.

Back to top

Which type of repository to choose

To choose where to save objects, you need to understand the differences between local and shared object repositories:

Use this object repository type...

In these situations...

local object repository

  • You create single-action tests.

  • You create simple tests or components, especially under the following conditions:

    • 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 One.

shared object repository

  • You create 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.

  • 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.

Note: If you want to use a shared object repository from ALM, you must save the shared object repository in the Test Resources module in your ALM project before you associate the object repository using the Associated Repositories tab of the Action Properties dialog box or the Associate Repositories dialog box.

You can save the shared object repository to your ALM project using the Object Repository Manager (as long as the Object Repository Manager is connected to your ALM project).

If you have an object with the same name in multiple associated repositories:

  • If an object with the same name is located in both the local object repository and in a shared object repository associated with the same action or component, the local object definition is used.

  • If more than one shared object repository is associated with the same action or component, the object definition is used from the first occurrence of the object, according to the order in which the shared object repositories are associated with the action or component.

Back to top