ExtraInfo for troubleshooting

Hello all,

I have not been able to find any information regarding problems with this function of Gatling. I did come across it, and thought it would be very useful to help determine why my tests weren’t working, but once I had the status and response showing, it was only more cryptic.

Here is my code for the ExtraInfo:

.extraInfoExtractor(ExtraInfo => {
if(ExtraInfo.status.name==“KO”)
println("httpCode: " + ExtraInfo.response.statusCode + ", Response: " + ExtraInfo.response.body)
List(ExtraInfo.response.statusCode, ExtraInfo.response.body.string)}

But this is the response I’m getting:

httpCode: Some(200), Response: io.gatling.http.response.StringResponseBody@64213846

First, does this look like an accurate response? Does it seem right?

Second, if this is the case, and I just can’t seem to interpret it, how can I interpret it? What do the numbers represent?

Thanks ahead of time for all the help.

Rob

Hi Robert,

response.statusCode returns an Option[Int] - you can get the Int value by using response.statusCode.getOrElse(0)

response.body returns a ResponseBody - you can get the body string using response.body.string.

These should give you what you’re after?

Hope this helps!

Barry

Thanks Barry! That’s what I was looking for.

Rob