Wednesday 18 April 2012

Object Repository: QTP

What is Object Repository in QTP?

It is a storage place of QTP where we can store the objects information and it also acts as interface between the test script and the AUT in order to identify the objects during the execution.

So what is Object?

Object is something, which has structure and properties.
What are the software objects: We call them windows, WebPages, Web Buttons, Edit Boxes, Check Boxes etc.

Types of Objects in QTP: There are four types of objects available in QTP.
  1. Run time objects
  2. Test Objects
  3. Utility Objects
  4. Automation Objects/User defined objects
There are two types of repository available in QTP.

1. Local Repository (.MTR extension)
2. Shared Repository (.TSR extension)

Local Repository: QTP creates a Local Repository for every action automatically during Recording. That cannot be shared among tests. User can add some more objects to Local repository. User can perform rename, delete operations in Local Repository. As it is QTP internal file user no need to sav modification.
Navigation: Once QTP is Launched --> Go to Main Menu-->Resources --> Object Repository (Short KEY Ctrl+R)
Shared Repository: User (Test Engineer) creates shared repository by adding objects. That can be shared among number of tests. Using this method user can perform modification on objects easily.

By: Mann Bhammar
      Test Analyst


1 comment:

  1. I would like to add bit more...

    Every action in a test by default comes with a local repository which is initially empty. When you record or add manually, objects along with their description properties, ordinal identifiers etc get added to the local repository.

    By Local it means that the OR is local to that particular action to which it belongs. Only the action to which it is local can use the objects in it. No other action in the same test or in another test can use the objects from the local OR.

    Shared OR means the OR can be created by adding all the objects needed and can be saved in a particular location. This OR can be then associated and then used in any action in any test.

    ReplyDelete