You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--iterations 1 seems to override --duration 1s (the executor is "shared iterations" instead of "constant VUs").
Expected behaviour
Not sure, but not this.
I understand that --iterations and --duration are shorthand for specifying a particular scenario configuration. Somehow I expected them to override the iterations / durations for the scenarios that require those values.
The most confusing part about this is that a different function is executed if these options are used.
At a minimum, I would expect something like (not all of them):
An error if both options are used, because one nullifies the other.
An error if the scenario configuration in the script is incompatible with the command line flags.
A warning if scenarios in the script are going to be ignored because of these flags. An error would be better.
Actual behaviour
The scenarios option is completely ignored and replaced with a configuration that matches (?) the command line flags, but it's not obvious to the user that what's going on.
It's even more confusing because --vus doesn't behave like this:
you can tell that it's not doing that because it's ignoring the vus setting in the script (it goes from 2 without flags to 1 with this flag). This is because it's discarding the scenario configuration in the script.
The text was updated successfully, but these errors were encountered:
Brief summary
If you specify either
--iterations
or--duration
on the command line, this will completely override the scenario configuration provided in the script.k6 version
v0.51.0
OS
Linux
Docker version and image (if applicable)
N/A
Steps to reproduce the problem
Start with this script:
Run it like this:
That's expected.
Now run it like this:
note the change in console output, and the fact that the scenario changed to
default
, and the scenarios specified in the script are ignored.Now run it like this:
Note how the executor changed.
Both flags together:
--iterations 1
seems to override--duration 1s
(the executor is "shared iterations" instead of "constant VUs").Expected behaviour
Not sure, but not this.
I understand that
--iterations
and--duration
are shorthand for specifying a particular scenario configuration. Somehow I expected them to override the iterations / durations for the scenarios that require those values.The most confusing part about this is that a different function is executed if these options are used.
At a minimum, I would expect something like (not all of them):
Actual behaviour
The scenarios option is completely ignored and replaced with a configuration that matches (?) the command line flags, but it's not obvious to the user that what's going on.
It's even more confusing because
--vus
doesn't behave like this:--vus
is simply ignored. It looks like--vus
is only used if--iterations
or--duration
is used.And it's even more confusing because with a script like this:
it looks like it's doing what you'd expect (override the "iterations" value in the scenario):
you can tell that it's not doing that because it's ignoring the vus setting in the script (it goes from 2 without flags to 1 with this flag). This is because it's discarding the scenario configuration in the script.
The text was updated successfully, but these errors were encountered: