I'm new with gatling and I have problem that I can't resolve by myself. I have to send request and after that I have to catch data from response. I can send request using get method, but I don't have idea how to extract data from response. Do you have any ideas how to do this? Thanks for your help.
1
votes
1 Answers
1
votes
I did this using check clause
http("Poll")
.get(Configuration.URL )
.queryParam("applicationId", Configuration.APPLICATION_ID)
.check(status.is(200))
.check(status.saveAs("statusCode"))
.check(xpath("//myRunTimeInfo").saveAs("runtimeInfoStatus"))
.check(xpath("//status").saveAs("responseStatus")))
.pause(Configuration.THINK_TIME second)
xpath : will do a search in your response using xpath specifications