You can associate object repositories with actions in several ways:

  • You can associate a single action with an object repository by right-clicking the action in the Resources pane and choosing Associate repository with action from the context menu. This opens the Open Shared Object Repository dialog box, enabling you to associate an object repository with the selected action.

  • You can use the Associated Repositories tab of the Action Properties dialog box to associate one or more object repositories with the current action. (Right-click an action in the Test Flow pane and select Action Properties, or select Edit > Action > Action Properties to open the Action Properties dialog box.)

Associate Object Repositories to Actions

Tip: You can associate shared object repositories with multiple actions simultaneously, using the Associate Repositories dialog box.

QTP searches these files to locate test object descriptions when identifying objects in your application. You can associate object repositories that are saved in your file system or in a Quality Center project.

Note: QTP uses associated object repositories from Quality Center project folders only when you are connected to the corresponding Quality Center project. If you are not connected to the relevant Quality Center project, all associated object repositories that are stored in your Quality Center project are listed as missing in the Missing Resources pane. (QTP always lists any associated object repository that cannot be found in the Missing Resources pane.)

In addition, if an object repository cannot be found, QTP displays a warning message when you click the Associated Repositories tab in the Action Properties dialog box. QTP also adds a question mark to the missing object repository icon to the left of the missing object repository in the Associated object repositories list.

You can associate as many object repositories as needed with an action, and the same object repository can be associated with different actions as needed. You can also set the default object repositories to be associated with all new actions in all tests.

The order of the object repositories in the list determines the order in which QTP searches for a test object description. If there are test objects in different object repositories with the same name, object class, and parent hierarchy, QTP uses the first one it finds based on the priority order defined in the Associated Repositories tab. The local object repository is always listed first and cannot be moved down the priority list or deleted.

You can enter an associated object repository as a relative path. During the run session, QTP searches for the file in the folders listed in the Folders pane of the Options dialog box, in the order in which the folders are listed.

Note: If you want other users or HP products to be able to run an action on other computers, and the action's associated object repositories are stored in the file system, you can set the file path as a relative path (click the path once to highlight it, and then click it again to enter edit mode). Any users who want to run this action should then specify the drive letter and folder in which QTP should search for the relative path in the Folders pane of the Options dialog box (Tools > Options> Folders node).

Important: If you are working with the Resources and Dependencies model with Quality Center 10.00, you should store the action's associated object repositories in the Quality Center Test Resources module and specify an absolute Quality Center path in the Folders pane.

You can add, delete and prioritize the object repositories associated with the action using the following buttons:

Associate Object Repositories to Actions2

0 comments