Home > loadurnner > loadrunner controller – invalid action

loadrunner controller – invalid action

October 29th, 2008

If you have ever written a loadrunner script, you’d have noticed the actions on left of the window. Actions allow you to split your script up into logical components, which help with debugging, recording, and not to mention the benefits in analysis.
By default loadrunner gives you 2 actions, vuser_init, and vuser_end. they are only executed once per script, regardless of the amount of iterations, and they do just as their name implies, initialise and end the virtual user. You have the ability to add your own actions, delete, and rename them, anywhere in between vuser_init and vusier_end. And this is where our problem begins.

The error that you will encounter will not be apparent to you, until much later, and when you think you are ready to run 500 virtual users, you will be faced with an ugly problem, that is more annoying than anything else…

Controller Error message

This problem will pop up for every single virtual user you are trying to load, before it initialises. So 500 virtual users = 500 error messages = 500 clicks on the “yes” button = annoying.
Even worse, if your ramp up time is something like 1 vuser every 30 seconds (a very generous ramp up) , that’s 15,000 seconds, which is over 4 hours of sitting at your screen clicking “yes”. Not my idea of good time utilisation.

The error occurs for the simple reason that you decided you had too many actions and decided to delete an action or rename an action while you were editing your script in Vugen. For some reason, some of the configuration files are not updated after deleting an action, and the old action names are recorded as part of the script. When the vuser is initialised in the controller scenario at run-time, the script reads one of the config files, which advises that “the following action(s) in script “blah” are no longer valid”, and that is when you are prompted to click “yes” to load the new script iteration settings.

I have tried numerous things to fix this, all which have failed. Creating a new script did not seem to work, apart from being extremely time consuming and annoying, its not ideal to re-setup my parameters and action names from scratch. Scouring the internet for this error proved totally useless, and my colleagues were also stumped as they faced this error in their careers which they were never really able to work around…Calling HP and raising a service request also did nothing.

Given that i had to load 1900 vusers in my current role, i didn’t want to sit in front of my PC for the entire duration of ramp up. I even pondered writing a script in ruby to click “yes” when it appeared, but I didn’t like the idea of a reactive solution, eliminating the error is always better than finding a solution for the error. So i went on a little hunt.

The solution
Lets cut to the chase. if you want to fix this problem easily and quickly without re writing your script. navigate to the folder where your script lies. In my example, its a remote server which is our sandbox where we store our scripts (as well as storing them in quality center, for obvious reasons).

Find a file called default.usp and edit it in your favorite text editor. I use ScITE which comes with ruby. You will notice a parameter called [Profile Actions].
That will list your actions. If you cross check this with the actions in your script you will notice that in my example, I only have 3 actions, whereas, the default.ups has 4.

It is clear, that the rogue action in my default.ups file is DVT. Simply delete it, save the file, refresh the script in your controller scenario (or close the scenario and reopen it to force refresh) and you can run your 500 users and walk away from your controller.

admin loadurnner

  1. November 11th, 2008 at 01:06 | #1

    Hi ,

    This article is really good and have been facing this issue since fromlast 2 months and have solved this problem by reading youre article.

    Really thanks a lot
    Regards,
    Murali

  2. admin
    November 11th, 2008 at 20:27 | #2

    Great to know its helped someone!. This problem really used to annoy me too…

  3. js
    November 12th, 2008 at 14:26 | #3

    Thanks for the article! I’ve had this problem occur periodically for the past few months and could not solve it. Previously I had to re do the script so that this would not occur.

    Thanks much!

  4. JC
    March 14th, 2009 at 18:47 | #4

    Thanks for coming up with a solution to the same very annoying problem which I had faced recently. Great job!!

  5. Todd D.
    April 16th, 2009 at 12:07 | #5

    Thank you mucho. this was literally the ONLY site that came up on the google search for the issue. I tried searching the text of all my files for the action that we deleted figuring it had to be a simple text file, but Windows Search could never find it.

    Thanks so much!!

  6. dave
    May 14th, 2009 at 15:57 | #6

    ey!! Good catch, working late here & you saved my day with that easy fix!!

  7. Drew
    May 15th, 2009 at 09:44 | #7

    Thanks Sameh! It solved this very annoying problem.

    Drew

  8. Drew
    May 15th, 2009 at 10:07 | #8

    One thing, I had to create a new scenario file before the change took place. Not sure if just removing/adding the group from the scenario would have worked as well.

    Thanks,

    Drew

  9. admin
    May 17th, 2009 at 17:37 | #9

    Thanks Drew,
    You won’t need to create a new scenario though. What you will need to do is close the scenario and re open it. Opening a scenario re-reads all scripts associated with the scenario and refereshes all the files.
    Cheers.

  10. AJ
    July 21st, 2009 at 08:32 | #10

    You are the man! I cannot describe how painful this problem has been from the past 2 months.

  11. KD
    January 13th, 2010 at 13:14 | #11

    Thanks a lot for the solution! Worked perfectly.. Saved me a lot of time

  12. Steven
    April 16th, 2010 at 00:25 | #12

    Thank you very much for the solution!

  13. paul
    July 2nd, 2010 at 23:50 | #13

    We also can take it over by setting the new scenario in controller after renew the script in Vugen.I promise the error will never happen again.

  1. No trackbacks yet.