Hello experts,
We are testing .NET application with built-in Infragistics2.Win.UltraWinGrid.v8.3, Version=8.3.20083.1009
controls. Also we use HP QTP with TestAdvantage (version 8.3CLR2.0) and it seems to me works a bit slowly.
Just look at the below peace of code wich takes 55 seconds to select 7 tabs:
cnt = SwfWindow("max_user").SwfTab("SwfTab").GetItemsCount
For i=0 To cnt-1 sItem = SwfWindow("max_user").SwfTab("SwfTab").GetItem (i) If sItem = sBlotter Then SelectBlotter = True SwfWindow("max_user").SwfTab("SwfTab").Select sBlotter Exit Function End If
Next
Please let me know if there any ways to increase script executing performance. Be aware I have tried to play with all QTP run settings and unfortunately it did not help.
There are a few things you can try to improve the run time of your UI tests.
First of course would be through QuickTest Professional, via the menu system Tools -> Options... It will popup a dialog, select the Run tree node, and from there you should see Run mode, by default I believe it is set to Normal, with each step having a 500 millisecond delay. Select Fast, and that should remove the automatic delay added from QuickTest Professional.
Second, for the development of TestAdvantage 2008 Volume 2, a base class was added that was inherited by all proxies. When the base class was added to 8.2, a 500 millisecond delay was hard coded into all actions. This was primarily because some actions were failing when running too quickly. It was later determined that this seemed to related to threading issues that were resolved for 8.3, yet the global action delay was never removed.
The fix was not to remove the delay, but to turn it into a settable ProxySetting with a default value of 0 milliseconds. Similar to other proxy settings this can be set per control globally via the SwfConfig file, or per script via SetProxySetting action. To facilitate this, GetProxySetting needed to be changed so that it isable to return an int, instead of just bools, so it was globally changed to return an object instead of just bool.
Settings enumerations Added : StepWaitTime (1001) : This is the delay added to end of each QTP Step. The value it takes is an integer, which represents the time delay in milliseconds. The default value is 0.
ActionWaitTime (1002) : This is the delay added to end of each UI Action. The value it takes is an integer, which represents the time delay in milliseconds. The default value is 0.
ErrorReAttemptWaitTime (1003): This represents a delay in some QTP Step, that when an exception occurs in one of it's UI actions, that is believed may go away if one of it's UI actions is reattempted. The value it takes is an integer, which represents the time delay in milliseconds. The default value is 125.
ErrorMaxReAttempts (1004): This represents the maximum number of attempts that an action may take when it hits an exception in one of it's UI action, that is determined that it could possibly be corrected if it is reattempted.
Definitions : QTP Step : this represents the call in a QTP script to a method in the TestAdvantage Proxy. IE SetCellData, Click, etc UI Action : this represents one call to the UI thread, to perform interactions with the UI control. Some QTP Steps may have several distinct UIAction calls. This is primarily for complex QTP Steps, that after one UIAction, you need switch thread context, so that the UI has time to react to the previous UIAction.
Currently only the WinDesktopAlert utilizes ErrorReAttempts.
For TestAdvantage releases 2008 Volume 3 to 2009 Volume 2, you will need to download the latest service release. For TestAdvantage 2010 Volume 1 and later, this change is in the release.