I have a k6 script that was converted from postman using the postman-to-k6 script.
I want to make use of the executor per-vu-iterations to set the maximum number of iterations that can be used by each VU. I don’t want the iterations to be shared between different VUs.
When I tried to define the per-vu-iterations like the example given here Per VU iterations - I am getting this on executing the K6 scrpt:
using an execution configuration shortcut (iterations) and scenarios simultaneously is not allowed
Isn’t it possible to use the per-vu-iterations with converted K6 scripts?
Is it because of the Iteration that is already set by the postman-to-k6 tool?
k6 run -e NO_OF_VUS=1 -e BATCH_SIZE=1 <script name>
I wanted the iterations and the vus to be populated from environment variables.
I have tried hard coded values in the script itself and it still seemed to use the “shared iterations” executor.
Thanks for your help.
Hmm you should drop the template literals, i.e. have vus: __ENV.NO_OF_VUS, iterations: __ENV.BATCH_SIZE directly. That said, this should have worked, not sure why you’re getting a shared-iterations executor, maybe something with the postman converter?