views:

43

answers:

1

We've observed that for some test cases Quick Test Pro takes very long to fill out forms. The web page is rather complex from its layout and size (150kb). There are about 40 fields where a test case fills out about 10 with the Standard Browser.Page.WebEdit.set command. The filling takes about 10-15 seconds. The problem persist over different test machines.

Doing the same test with e.g. selenium the form fillout takes just a second.

Is this a known problem or are there any options to speed this up?

+1  A: 

There are a lot of reasons why QTP script can be slow.

  • Try to turn off smart identification
  • Make sure that qtp doesn't wait for some previous action to finish.
  • See QTP logs and analyze time when each action starts. Does the problem happens exactly on Standard Browser.Page.WebEdit.set step?
  • Tool > Options > Run tab. Check out "Run mode" and "Screen capture" options. Saving videos slows down scripts.
  • etc
katmoon
Yes, the time problem lies exactly in the Browser.Page.WebEdit.set steps, each one takes a little over 1 second.All other options are already set as you suggested.
John Dumont
Then my guess is that it is slow because it finds a needed object WebEdit a little bit slowly each time. Can all edit boxes be uniquely identified?
katmoon
WebEdit Boxes are identified by a unique ID element (<input id="x">).
John Dumont
@John Dumont. Have you found the answer? Is it because QTP is slow?
katmoon
Yep, the QTP Action takes so long, even when I eliminate all other variables, e.g. calling the set method with a static value. The Lookup of the element takes the time.
John Dumont
@John Dumont. It might happen if QTP object repository is huge. Especially in QTP 8 and below. If speed is important or you are curious, you can try to use descriptive programming.
katmoon
Descr programming: Well the repo is there for a reason. If it is huge, consider splitting it up. Also figure that a With statement is not just syntax magic, but also dispatches the description to the object handle only once, so doing A.B.Click A.C.Click is slower than With A .B.Click .C.Click. -- But generally: If you are looking for performance, do not use QTP. That beast is a CPU time waster imho.
TheBlastOne