QTP/UFT How Many Actions Can a Test Have

QTP/UFT How Many Actions Can a Test Have

UFT UPdate

How many actions can a QTP or UFT test script have?

I’ve received a few emails over the past years inquiring about if there was a limit to the number of actions a script could use. I’m surprised I’ve never created a post especially to address this question. So rather than to continue to answer each one individually, I thought it would be better to frame my reply in the form of a quick post.

UFT Actions Stink

First I hate actions – I never use them. I would rather use a function library approach over actions. I think that actions are harder to maintain and use.  With UFT one of the drawbacks, of only being able to open one action at a time, in the IDE, has been changed. Now multiple actions can be opened in UFT making some of the maintenance issue a little more bearable.

But I still hate actions. OK –enough with my rant.

120 UFT Actions per Script

Since QuickTest Professional 9 the limit has been a maximum of 120 Actions — either usable or non-reusable– can be placed in a tests. This limit still exist in UFT.

If you hit the actions limit you can work around by using functions instead (Which is the approach you should have taken from the beginning :) )




Babji - December 3, 2013

Hi Joe , i am able to create 255 more actions apart default Action1 in qtp 10.0

    Joe Colantonio - December 4, 2013

    Really– You have a tests that has more that 150 actions? Do you have any issues when you run it?

Sanju - January 21, 2014

Hi Joe,
Excellent blog you have. Am a relatively new user of QTP.
I am using the web Flight reservation application and have used descriptive programming completely.
Divided my script into foll actions – Login, Flight Finder, Select Flight, Book Flight, Confirm Booking (which invokes Flight finder page at end). I do not want to execute Login again in next iteration; but after Confirm booking action, go back to Flight Finder,Select Flight,Book Flight,Confirm Booking and so on (i am using local data sheets for iteration).
But if i run my script, the foll happens:
Login, Flight Finder, Select Flight, Book Flight, Confirm Booking , Flight finder.
A new instance of IE opens with Login, Flight Finder. Naturally the script fails.
How can i execute login action only once and keep looping between Flight Finder, Select Flight, Book Flight, Confirm Booking,Flight finder..etc for every iteration.

    Joe Colantonio - January 24, 2014

    HI Sanju — I’m not a big user of actions but I believe that in the Action’s Call Properties there is a setting to make it only “Run one iteration Only” option

Click here to add a comment

Leave a comment: