I would like to specify vus and duration for the above scenario to be executed.
However, if vus or duration is optionally passed and executed, the exec specification is ignored. As a result, the default function is executed and the test is not executed.
When using duration as a CLI flag, you are actually using a shortcut for a single scenario with constant vus. You won’t be able to create more scenarios using that. And there is no way to specify the exec via CLI, so it takes the default. I find this a bit confusing as well so I’ll discuss this with the devs team.
If I understand correctly, this is similar to what we discussed in How to specify `rate` on CLI - #3 by eyeveebe. Support for configuring scenarios via CLI flags is very limited, and it’s probably causing this unexpected behavior.
Thanks for the advice !!
I see, so that’s how it was. I didn’t understand the documentation well enough…
That is exactly what I am doing now to avoid the problem by replacing it with an environment variable.