I have created total 50 test scripts. All these scripts use almost same objects so I have created a Shared Repository to ease the maintenance work.
But the problem is…
While executing scripts in Update Run mode, QTP adds some objects in local repository even if they are present there in Shared Repository. I have checked properties of these newly added objects and there are no change in that too.
Anybody please tell me the logic QTP uses to decided whether to add a object to local repository or not.
Also tell me a solution so that no object is added to the local repository.
There are two things at work here.
since SORs are by definition shared, QTP wants to make sure that
when someone makes a change to a SOR he is aware that many tests may
be affected. Therefore in order to edit a SOR you have to use the
Object Repository Manger and no changes are made to a SOR
automatically (Update Run Mode or Maintenance Run Mode)
This explains why you’re getting objects in the Local Object Repository (LOR) and not the SOR, (I’m not sure if having unmodified objects added to the LOR is the correct behaviour or not).
In order to propagate the changes after the Update Run Mode you should export the LOR to a new SOR and then merge it with your existing SOR.