Monday, July 18, 2011

Shared Object Repository Vs Dynamic Programming

When to use shared repository(SOR) vs descriptive programming(DP).
1. QTP can perform faster with SOR, because while replying a script if it encounters an object, it will create a temporary test object with the description, and it uses this temporary test object for the rest of the test execution rather than building this test object for each occurrence.
Where as in "Static DP" that is not the case, each time it builds the objects and uses while execution.
If properly written\coded, "Dynamic DP" have the same performance as Shared OR.

2. Object identification with OR is more handy, because we can configure properties for mandatory & assistive properties and ordinal identifiers and also we can enable smart identification mechanism for object identification.
Where as in DP, all the properties used are treated as mandatory properties.

3. We can associate a single SOR and we can access in any action\test.
Where as in static DP, we build objects in the action\test, which cannot be accessible in other actions\tests.
Where as using dynamic DP, we can write driver script which loads all objects(say in dictionary object) and can be used.

4. QTP automatically creates the SOR while recording or manually adding Objects to OR.
Where as in DP, we need to identify unique properties in the application, and use those properties which is a time consuming task.

5. With SOR we can export\import objects to XML files. No such functionality with DP.

6. DP is more useful when working with dynamic objects.
Ex: want to verify all links in a webpage. Here we just create an single link object description and use it to verify all the links. That is not the case with SOR, we have to store and each and every link(which is not always possible, because the links are dynamic).

7. Regular expressions can be used in both SOR or DP.

8. Parametrization can be done in both SOR or DP.

No comments: