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.
If you specify getExample() in the function default, it will be executed, but this was not a good approach because we want to run multiple scenarios in parallel.
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 immavalls2. 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.