I have a rather complicated setup which forces me to pass --duration
and --vus
to k6 CLI.
It ends up looking like
k6 run --vus 200 --duration 60s fixed-scenarios.js
Because of this my custom scenarios are being overridden by a default scenario.
Is there a way to prevent it from within the script?
In k6 order of presence cli flags will override everything else.
import http from "k6/http";
const options = {
foo_scenario: {
executor: "shared-iterations",
vus: 1,
iterations: 1,
maxDuration: "10s",
},
};
export default function () {
http.get("https://stackoverflow.com");
}
k6 run script.js
it will make one request.k6 run script.js --vus 10 --iterations 10
it'll make 10 ten requests.