Search code examples
typescriptperformance-testingk6

K6 test execution behavior



Hello everyone. I am new to K6 and have a question regarding test execution.
For example i have some small test with given config.
export const options = {
stages: [
    { target: 10, duration: '30s'}
]}

when i run test with this config, at the bottom of a console i can see this line
[======================================] 01/10 VUs.
Does it mean that k6 executes tests sequentially and only after one iteration is done next one starts?
I thought that the test will be executed simultaniously


Solution

  • options.stages is a shorthand for a single scenario with a ramping VUs executor.

    With your stages, k6 will start with a single VU at second 0 of your test and then increase the number of VUs linearly over time so that it reaches 10 concurrent VUs after 30 seconds. After 30 seconds, your test will end.