How to pass access token to Gatling script in regular Interval

64 views Asked by At

In my application, The access token expires every 1 hour.

Current set up:

setUp(PairingScenario.accessToken.inject(atOnceUsers(1)),
  PairingScenario.Pairing.inject(nothingFor(3 seconds),rampUsers(users).during(rampUpTime seconds))
).protocols(SetHttpProtocol.connectWIthCertificate)

In above case, I am getting access token from an endpoint and passing it to main script. Here the access token is valid for only 1 hr. The script works only for cases within 1 hr.

As per my understanding, we cannot modify the session variables during runtime.

How can I am implement a solution where access token can be called periodically without interrupting main script ?

0

There are 0 answers