I am new to K6 Load test, below is the snippet of my load test using stages. Is it correct?
I want to start from 1 vu and then increase to 200 and then to 0.
Also, what would be the command to execute it if the file name is test.js?
export const options = {
scenarios: {
ui: {
executor: ‘ramping-vus’,
vus: 1,
stages: [
{ duration: ‘5m’, target: 200 }, // traffic ramp-up from 1 to a higher 200 users over 10 minutes.
{ duration: ‘30m’, target: 200 }, // stay at higher 200 users for 30 minutes
{ duration: ‘5m’, target: 0 }, // ramp-down to 0 users
],
options: {
browser: {
type: ‘chromium’,
},
},
},
},
thresholds: {
checks: [‘rate==1.0’],
},
};