QTP - Object Repository Types



Based on Context, the Object Repository is of two types.

Local Object Repository

As the name suggests, the Object Repository is applicable only for that action. As we know, that QTP creates a New Test with 1 action by default. Local Object Repository can be opened by traversing to Resources → Object Repository. This is the default OR in QTP.

Local Object Repository

Shared Object Repository

The Object Repository is shared across actions/modules, which would be mapped for two or more actions. Local objects can be exported to be saved into Shared Object Repository by using the option "Export Local Objects" option. Shared Object Repository can be opened by traversing to Resource → Object Repository Manager

Shared Object Repository

Following are the major difference between Local and shared ORs.

Local Object Repository (LOR) Shared Object Repository (SOR)
This Object Repository is available; one for each action. This type of OR is available for multiple tests and for multiple actions.
This is the OR that is available for each tests, by default. This type of OR is usually used in frameworks considering reusability and maintainability.
Local Object Repository is editable in Object Repository. Shared Object Repository is read-only by default but can be edited in Object Repository Manager.
It is NOT a standalone file that can edited. SOR is a standalone file that can be edited easily.
It is saved with an Extension .bdb SOR is saved with an extension .tsr
It should be used when not many tests are working on the same screens of the application under test. SOR Should be used when there are different scripts interacting with the same type of the object.
qtp_object_repository.htm
Advertisements