QTP - Object Repository Types
Object Repository(OR) 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 -> gt;Object Repository. This is the default OR in QTP.
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" Options. Shared Object Repository can be opened by traversing to Resource ->gt; Object Repository Manager
Below are the major difference between Local
|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 reusuability and maintainability.|
|Local Object Repository is Editable in Object Repository.||Shared Object Respository 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.|