Hello, I have an API request that has request body as this
{
"pk": {
"pairingKey": "pairKey"
},
"device": {
"id": "idname"
},
"posName": "posName",
"posVersion": "posVersion"
}
And the return body:
{
"session":{
"id": "idname"
},
"at":{
"token": "token"
},
"rt":{
"refreshToken": "token"
},
"error": null
}
I need to take out the refreshToken, so I have scripted for Gatling as this:
pause(500.millis)
.exec(
//config
.body(StringBody(s"""{"pk": {"pairingKey": "#{userKey}"},
"device": {"id": "#{randomDeviceId_REST_out}"},
"posName": "posName",
"posVersion": "posVersion"}""")
)
.check(jmesPath("rt.refreshToken").saveAs("refreshToken_out"))
)
On Postman when I run 2 requests with different profile (pairingKey and deviceId), it would return me a refreshToken, id and at which is completely different from each other
But when it comes to Gatling make request to the server, it would oddly return the same refreshToken, different id and at, but the deviceId and pairingKey has been ensured to be different from each other. What could possibly the issue here? any help would be appreciated alot