How to associate Shared Object Repositories to the test (QTP 9.0)?

With QuickTest Professional 9.0, you can associate multiple Shared Object Repositories with each action. Each action will always be associated with a Local Object Repository and can also be associated with one or more Shared Object Repositories.

Note:
All Shared Object Repositories are associated at the action level, not the test level, in QuickTest Professional 9.0. If you open a test that was created with an earlier version of QuickTest Professional, the Shared Object Repository will be associated with all of the test’s actions automatically.

Associating Shared Object Repositories with an action:
1. Right-click on the action, and select “Action Properties.”
2. Select the Associated Repositories.
3. Click the “Adds a new shared object repository file to the list” button (with the + icon).
4. Browse to and select the desired Shared Object Repository.
5. Repeat steps 3 and 4, as needed.
6. If needed, move the selected repository files up and down in the list using the arrow buttons.

Associating Shared Object Repositories with multiple actions in one script:
1. Go to Resources -> Associate Repositories.
2. In the Associate Repositories dialog, click the “Add Repository” button (with the + icon).
3. Browse to and select the desired Shared Object Repository file.
4. Repeat steps 2 and 3 as needed for all Shared Object Repository files.
5. Select one of the repository files.
6. In the Available Actions list, select the actions the Shared Object Repository should be associated with.
7. Click the “>” button. The selected actions will move to the Associated Actions list. If you want to associate the file to all actions, click the “>>” button.
8. Repeat steps 5 through 7 for all repository files in the list.
9. Click <OK>.

Associating Shared Object Repositories with all new actions:
1. Right-click on the action, and select “Action Properties.”
2. Select the Associated Repositories.
3. Click the “Adds a new shared object repository file to the list” button (with the + icon).
4. Browse to and select the desired Shared Object Repository.
5. Repeat steps 3 and 4, as needed.
6. If needed, move the selected repository files up and down in the list using the arrow buttons.
7. Click <Set as Default>.
8. Click <OK>.

Note:
Any new action created after this option has been set will use the specified Shared Object Repository files by default. To modify existing scripts, you will need to use one of the first two options.

3 Responses to “How to associate Shared Object Repositories to the test (QTP 9.0)?”

  1. Franck Says:

    Hi !
    I ve tried this but when I record an action, the new objects are not recorded in the shared object repository; they are recorded in the local repository.
    Franck

  2. Ashok Says:

    How to Associate .tsr file in a QTP Action, i have to handle this in Script.

  3. pipicato Says:

    my $qtRep = Win32::OLE->new(“Mercury.ObjectRepositoryUtil”);

Leave a comment