Some of the QTP projects/users might have experienced the following problem when their project getting huge or they need QTP execution very frequently for their product release.
Problem: When repository is getting huge due to the large no of objects being added to object repository. Memory usage will be high when the Object repository size increased causing a decrease in the performance of QTP while recognizing objects. As you aware of QTP 8.2 and below Mercury recommends that OR size should not be greater than 1.5MB.
Solution: Descriptive programming (DP) which does not depend on the QTP object repository features. But it stores the Application objects property values in the code itself.
What is DP, how that can be achieved and when it is utilized more………
DP is nothing but avoiding QTP object repository by directly describing an object property values in the code. For example, to close a Browser,
Set X = Browser (“Micclass: =Browser”) ‘code assigns Browser description to a variable.
X.Close ‘code will close the browser.
The alternative method which uses Object Repository does the same functionality but it initially checks the Browser description in Object repository locations and tries to map with web browser which consumes more time.
You can also use descriptive programming in order to perform the same operation on several objects with some identical properties. Suppose an application has 2 buttons on its 10 pages. Let the buttons be “Cancel” and “Save”. DP needs minimum of 2 lines of code for this 2 buttons in 10 pages.
Alternative method directly increases the objects in to 10 times in Respiratory according with number pages increases in the AUT.
These are some of the usages of DP which reduces object repository size there by increasing QTP performance.
Problem: When repository is getting huge due to the large no of objects being added to object repository. Memory usage will be high when the Object repository size increased causing a decrease in the performance of QTP while recognizing objects. As you aware of QTP 8.2 and below Mercury recommends that OR size should not be greater than 1.5MB.
Solution: Descriptive programming (DP) which does not depend on the QTP object repository features. But it stores the Application objects property values in the code itself.
What is DP, how that can be achieved and when it is utilized more………
DP is nothing but avoiding QTP object repository by directly describing an object property values in the code. For example, to close a Browser,
Set X = Browser (“Micclass: =Browser”) ‘code assigns Browser description to a variable.
X.Close ‘code will close the browser.
The alternative method which uses Object Repository does the same functionality but it initially checks the Browser description in Object repository locations and tries to map with web browser which consumes more time.
You can also use descriptive programming in order to perform the same operation on several objects with some identical properties. Suppose an application has 2 buttons on its 10 pages. Let the buttons be “Cancel” and “Save”. DP needs minimum of 2 lines of code for this 2 buttons in 10 pages.
Alternative method directly increases the objects in to 10 times in Respiratory according with number pages increases in the AUT.
These are some of the usages of DP which reduces object repository size there by increasing QTP performance.
Comments
Post a Comment