I am experimenting with k6. I want to know if using executor in default scenarios is posssible?
my options object look like below. Note "Executor" property
export let options = {
vus: 1,
duration: '1s',
executor:'constant-vus'
}
when running k6 script i get Warning message WARN[0000] There were unknown fields in the options exported in the script error="json: unknown field "executor""
the documentation doesn't say anything about using executors in "default scenario" so i am raising this question to the community.
please let me know
The
executorproperty is only available inside scenarios. If you don't provide anexecfunction explicitly, the default function will be used.This is covered in the
constant-vusexecutor exampleNote that
constant-vusis the default when not using any scenarios and specifying duration and vus. So the above is equivalent to the following config:Which is exactly the options from your question, minus the executor itself (but it still uses the constant-vus executor).