Skip to main content

Thoughts on improving QTP execution performance by utilizing Descriptive programming (DP) .....

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.

Comments

Popular posts from this blog

RIA !!!

Heard about the buzz word of the Web World RIA? If not, you are here in the right place. I was bit curios about the Rich Internet Application when I came across an interesting statistics. It says by the end of 2010 majority in the web application domain would migrate to RIA, and the figure mentioned precisely is 60%. Well that’s an impressive numeral, considering the web presence and the count of the web applications available right now. RIA!! The Rich Internet Application is a novel idea coined by macromedia in 2002. It was not known to many till few years back, but with Web 2.0 boom RIA got a solid place in the web world. The desktop applications are known for its flexibility and the responsiveness. Meanwhile the web is very famous for its reach. The RIA combines both these features, thereby giving the users the intuitive experience. RIAs are not just about look and feel; they actually provide significant value to the enterprise. Consequently, RIA adoption is increasing day by day. ...

Problem in syncing QTP with your web application.....

You have a very simple solution ...Instead of using wait property or inserting synchronization point. The following piece of script can be made reusable action and can be called anywhere while web page is loading.. If Browser (“micclass: =browser”).page (“micclass: =page”).exist then Environment. Value (“class”) = browser (“micclass: =browser”) Else if Environment. Value (“class”) = browser (“creationtime: =1”) End if Start timer = time Set B = Environment. Value (“class”) While B.busy = true OR B.readystate 4 Set B = Environment. Value (“class”) Wait (1) Wend End timer = time If time > = 0 then Msgbox (“browser is loaded”) End if Note: In While loop, 2 properties of Browser being used.