Descriptive Programming or Object Repository in UFT


There is always a discussion about what to use between descriptive programming or objective repository to identify the objects with QTP/UFT. And nowadays testers are going more towards descriptive programming instead of having knowledge about its advantages and disadvantages.

I am writing not against any methodology but putting my perspective about when to use descriptive or object repository.

The first reason users always give with descriptive programming that it is used when object is dynamic. But don't we have regular expression functionality in object repository which can also handle the dynamic objects. And you can write any logic to find the property and same property can be set to the test object using SetTOProperty method.
Also the setting of object identification in QTP resolves most of the issues with the object identification.

The second reason users give is about the speed. This is also a misconception, as qtp works faster with object repository in comparison to descriptive programming.

The third reason users give is for the size of the object repository in comparison to descriptive programming. I also agree with this point because for the large applications if you are creating a single object repository then it becomes very bulky to handle.

So here are my points as per my journey in test automation.

It is always best when you use the inbuilt functionality of the tool (like QTP) to identify objects because that will be more beneficial.

User don't need to maintain the objects in external file like excel or csv. The association of object repository is easy instead of doing programming for the external file.

Object repository is faster in comparison to descriptive programming.

If user is working on standard applications like oracle, SAP, peoplesoft then object respository is the best choice because there are minimal chances of dynamic objects.

The descriptive programming will be most beneficial when tester knows the property of the objects but the UI is not available. So the scripting for the test automation scripts can be started parallel to the application development and it will save a lot of time. I know it is difficult to know the object properties beforehand but tester can plan it with developer by deciding on a unique ID to the objects and maintained a list of that.

Above are just my thoughts and no ruling against any methodology. Please let me know if your thoughts maybe there are different perspective based on your experience.

Comments

Popular posts from this blog

UFT - Resolving scrolling issue if object is not visible

How to create a zip folder using VBScript

how to access the excel file as database in UFT?