QTP/UFT – How Many Actions Can a Test Have

Automation Guild Online Conference Top ad

How many action 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 amount of actions a script could use. I'm surprised I've never created a post specially 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.

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 action 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 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 function instead (Which is the approach you should have taken from the beginning :) )




4 comments
Babji - December 3, 2013

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

Reply
    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?

    Reply
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.

Reply
    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

    Reply
Click here to add a comment

Leave a comment: