Hi,
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?
What is the command you are running to execute k6? i.e. k6 run .... If you could share the options inside the script as well, that might help us figure out why you’re seeing this message.
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?
Thanks for your suggestion @ned . I have tried your suggestion and its still not working. I had tried hard coded vus and iterations earlier and that didn’t work So maybe its a postman converter thing.