Quantcast
Channel: Grafana k6 - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 360

Is my below Load test script with stages is correct?

$
0
0

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’],
},
};

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 360

Trending Articles