Micro Focus QTP (UFT) Forums

Full Version: Writing optimized QTP scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am using DP for developing Test Cases in VB Script. I am looking for some guidelines/best practices for developing optimized scripts. I googled a lot for some articles written in this direction. I didn't find any but http://www.advancedqtp.com/forums/index.php?topic=110. Can anyone share his/her useful views on this topic?

So far I found that most of the time is spent on setting values in various controls using statements like WebEdit.Set, WebList.Select ,etc. Is there any trick to optimize on this?

WebEdit.Object.value = <some value> is little faster but it is not very reliable and also it makes scripts IE specific. Additionally, if page gets reloaded then we have to use the undocumented init(). I think this can make my scripts fragile if HP wants to do so, isn't it? Any thoughts?

Thanks in advance
nice question... I have put across a list of my experience with optimizing QTP scripts

>>So far I found that most of the time is spent on setting values in various controls using statements like WebEdit.Set, WebList.Select ,etc. Is there any trick to optimize on this?

if you are using DP make sure you are not using more than the required properties to uniquely identify the object. Other than that, I don't think much can be done for optimizing these statements.
Thanks Ankur. It was indeed useful!