3

I am working in Gatling. when I inject with 1000 users, GUI shows some failed request, I want to know which request got failed? How to understand why the request will get fail? Maybe accessing low-speed internet got failure sometimes is it true?

Below is my Scala code where failed request found:

.exec(http("request_11")
.post("/notifications/statusUpdate")
.headers(headers_11)
.formParam("notif_id", "152")
.formParam("conditions", "")
.resources(http("request_11 Redirect")
.get("/employee/selfservice/grievance")
.headers(headers_0)))

How to understand why this request got failed?

enter image description here

1

Use saveAs ans session.

Something like this (maybe needs some changes):

.exec(http("request_11")
.post("/notifications/statusUpdate")
.headers(headers_11)
.formParam("notif_id", "152")
.formParam("conditions", "")
.resources(http("request_11 Redirect")
.get("/employee/selfservice/grievance")
.check(jsonPath("$")
      .saveAs("myresponse"))
).exec(session => {
  println(session)
  session
})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy