Header Ads

How Many Types of Object Repository Are Present in QTP?

Object Repository is place for scripts to store information/properties about objects.
Object repository is maintained in XML format.

Object repository has two views..
  • Runtime Object Properties
  • Test Object Properties 
Runtime object properties are those properties which are changing during run time and in this tab we track those details
user can use 
Dim abc=Object.getROProperty("Name") 

Those properties which are fixed and identified by QTP while recording are tracked here.However we can add more properties to identify it uniquely by using SetTOProperties and GetTOProperty and GetTOProperties.

While setting test object,We need to remember that these filters or details are applied on the temp instance of the object. once the Test is ended/ machine restarted the filters become void.

There are two types of object repository:
1. Local/ Per Action: For each action based test the QTP will create and manage the individual Repository.It is good when the test is small.It is local to test.It is automatically saved in a test whenever we record a test.It resides in bdb folder in action sub folder.
File extension is .mtr(modular test repository)
Advantage: 
  • It is not an overhead.
  • Very Fast.
  • Object conflict will not occur.
  • Objects can be edited from repository only
Drawback: 
  • Difficult to maintain
  • Duplicate entry of Objects to repository is possible

2. Shared : It's central storage where the object information associated with multiple tests can be stored.After creating the Repository we should associate that repository to your action and then perform Testing.Object Repository Manager can be used for this
-File extension is .tsr (Test shared repository)
Advantage: 
  • Easy to maintain
Disadvantage:
  • OR size will be huge
  • Execution will be slow
  • Object conflict need to be handled properly.

Navigation for adding Shared Object Repository:- Resources --->Object Repository Manager.
Associate Repository ---> Resources --->Associate Repositories.
Powered by Blogger.