I have 2 http calls in 2 different function def and saving json keys from response body in gatling session. How can I match them?
def getAppData():HttpRequestBuilder = {
http("get application resource")
.get("host/app")
.header("Authorization", "Bearer "+ token)
.check(status.is(200))
.check(jsonPath("$..${app_info}").saveAs("app_Response"))
}
def getUserData():HttpRequestBuilder = {
http("get user data ")
.get("host/user/data")
.header("Authorization", "Bearer "+ token)
.check(status.is(200))
.check(jsonPath("$..${user_info}").saveAs("userdata_Response"))
}
How do I compare or verify that the json values of app_info and user_info matches ie;
app_Response
and userdata_Response
The values of both of these are arrays . For instance, in this format:
"app_info":
[
"name",
"address"
]
same for user_info. I gave a try to use in-built methods of jsonPath().equals() but I believe that's not appropriate way for comparing. If not a way using gatling specific methods then perhaps will find how to perform using scala?
Kindly help.