Running scenarios in specific order


Is it possible to run k6 test scenarios in specific order?

I read somewhere in github there was plan to implement a startAfter feature PR.

You can run scenarios sequentially (or, have them overlap) using duration and startTime.

1 Like

but is that designed specifically for sequential running of things? sounds a bit fragile if one scenario goes past duration etc

In my experience these scenario options will reliably do what you define. There may be some limitations on some of these options based on executor type but I have had consistent results with sequential execution using duration, startTime and then gracefulRampDown and gracefulStop to ensure the scenario is halted. AFAIK there is an upcoming enhancement for explicit sequential chaining, something along the lines of “dependsOn” but can’t remember exactly.


Hi @yosiasz

I believe the feature request you are after is Test suites / execute multiple scripts with k6 · Issue #1342 · grafana/k6 · GitHub. Feel free to add a :+1: to help prioritize it, and add any comments if needed.