I have a problem with my Gatling execution. We have a specific way of generating tokens for the user session. We first call a function outside the Gatling scenario to set up the Authorization header, and then I start the execution. The problem is that the token only lasts 10 minutes and I want to generate a new one during the execution.
I’ve tried multiple approaches, like calling the token function when I receive the 401 status code, but I always end up with the token being generated for all the 100 users, when instead I just want to run the function only ONE time.
Thank you very much! It worked perfectly here!
One thing is that my console output now has the other scenarios exits.
I was wondering if there is any way to hide the output of the scenario on the console or in the final metrics.
If there is no way to hide it, no worries.