I need to generate a token for every 2 hours (the expiration of token is 2 hours). How to get the time so that for every 2 hours I need to regenerate the token. Consider I need to perform a load test of 8 hours and every 2 hours the token should automatically generate it.
Is there any controller available in Jmeter for the above process. Any help will be much appreciated !!
Note: My test plan contains 2 thread group where first is to create the token and second is to perform the load test. As of now I am redirecting to generate token when previous request fails.
I would configure 1st thread group to generate a token each 2 hours, i.e.
-1
or tick Forever
token
Pause
for 7200000
milliseconds ${__P(token)}
More information: Knit One Pearl Two: How to Use Variables in Different Thread Groups
JMeter Properties are global for the whole JVM therefore once the value is set in 1st thread group it will be immediately updated in 2nd thread group.