QTP tutorials & interview questions


Search more on QTP here

QTP Object Repository Vs Descriptive Programming

There is no specific answer as to which of the two (object repository or descriptive programming) is better. There are certain situations when using descriptive programming has its own benefits (with descriptive programming along with other features you also get code portability) while in some other typical situations object repository works like a charm (No need to adjust the script when an object properties change, Highlighting an Object in Your Application etc are couple of features you can’t just resist and of course there are many more). Below you can find some of the differences between object repository and descriptive programming. (Differences between object repository and descriptive programming are not limited to what is shown below, there can be many more)


Object RepositoryDescriptive Programming
With object repository QTP automatically resolves which properties and values are required to uniquely identify an object. QTP starts with predefined mandatory and assistive properties in that order. If the mandatory and assistive properties do not uniquely identify an object, QTP uses an ordinal identifier. QTP can also use Smart Identification (if enabled).With descriptive programming set of property/value pairs are created by you and all are mandatory, although you can use object spy to get help in selecting set of property/value pairs.
Object repository in QTP is created automatically (manual creation is also possible) as and when you record on the application.Descriptive programming statements need to be put into operation manually. Finding a set of properties to distinctively identify the object time and again can be time consuming.
Object repository is considered relatively faster if you take into account the performance for large applications.It is considered relatively slower to create and performance wise also in case of large applications.




Also See:

Parameterize Descriptive Programming
Important QTP Descriptive Programming Questions
Descriptive Programming in QTP
Object Repositories in QTP