Check failing for some reason

Hi all,

I’ve been using Gatling in the past month to load test an application. In one of my requests, I’m using a css selector to save the value of the csrf token so i can use it in the next request:

.exec(http(“login page load”)
//saving csrf token to be used when submitting the form
.check(css(“input[name=’_csrf_token’]”, “value”).saveAs(“csrfToken”))

I’m simulating 1000 users. Here are the results for this request:

As you can see, 83% of the errors are due to the selector failing to find the token, Although it has worked for 474 requests, it failed for 437…

I’m trying to figure out what might cause this…
Any help is appreciated.


It’s not finding that value.

Debug all failed responses, getting body and checking the expected code is there.