Hi, I would like to know, If is possible to make k6 execute some logic only one per VU, I mean for example I want to make a login when each VU starts, but after having the access token don’t do this again.
Are you looking to just execute an action once per test in total? If so, you may want to check out the setup and teardown lifecycle stages. . During setup, actions will be completed one, by virtual user 0. You can then pass this information to the default function. Similarly, you can use the teardown function later on for post test actions. I think this is most useful if you need to terminate an environment or trigger a process to clean something up.