My token expires in 2 hours, is there a way to refresh the token while executing the script to get the new token and continue the flow?
I do have a CSV file with 15000+ records, when ramping up users in the simulation file, it is supposed to make 300000 api invocations. I am wondering what if the token expires in the middle, Can you please advise how to handle if token expires in the middle in Gatling/Scala?
I capture access token and store as a session variable just once, and then run the simulation test with 5 users, since the csv file has 15000+ records, (used repeat from gatling) it invokes 5 users*150000 csv records= 300000 api calls. thought that it is not a good idea to get the token each time, for 300000 api calls, but wondering the same time what if token expires in the middle of the execution, Can you please advise how to make sure to process all 300000 api calls successfully with the valid token, is there a way to get the token only when it is expired to continue the flow, rather than getting the token for each api call? Please advise.
rampUsers(20).during(50), and i do have 20*15000 records=300000 api calls