Does a VU always use the same scenario across iterations in a multi-scenario context?

I have a use case where cookies are shared between iterations, and to gauge the reproducability of my load tests/experiments, I’m curious how VUs are tied to scenarios, i.e., are VUs always assigned the same scenario between iterations?

If they are not, I will combine all the scenarios into one and branch based on the modulo of __VU, per How to distribute VU's across different scenarios with k6 - #2 by mstoykov.

Hi there,

in general VUs are agnostic to which scenario they run in, and can be reused by other scenarios, so the answer to your question is “no”. That said, executors (the component that actually schedules VUs) return VUs to the global VU pool when they’re not needed anymore, which is handled somewhat differently between executors. So you might notice the behavior of certain VUs “sticking” to the executor they were first scheduled in, but this is not required and you shouldn’t depend on it.