Any way to pass the options load goals at runtime?


I’m often using the same script with various options load goals: stages/startRate/preallocatedVUs/maxVU.
And I can’t find a way to use a single script while passing those varying options at runtime…

I tried to use some variables in my script in the options part, and pass them using the --env options, but it doesn’t seem to work for the options part, when affecting a variable to an option, I get ‘ERRO[0000] json: unsupported value: NaN’…

Is there a way to do this? Thanks.

HI @Nicolas, welcome to the forum :slight_smile:
Can you provide us with an example where this happens? As this is something that a lot of users have done without any trouble, if I understand correctly what you are doing.

I expect that the issues is:

  1. there is an undefined __ENV. that you are using
  2. some of the options that you use should be a number but they aren’t and that is where the NaN (not a number comes from).

Both of those should be easily diagnosed with some console.log lines, but if you have trouble I will be happy to look at the script that you are having trouble with.


You are right, thank you. I thought it was a problem related to the options declaration, but it was just a mistake I made.