I'm using BlazeMeter recording tool and running it on JMeter, but in my response data I'm getting CSRF token validation failed when I try to test my web application's login page.

enter image description here

enter image description here

  • Possible issue is, you are passing that token hard coded. you need to extract the new token every time comes in GET request and store into some variable and then have to pass that variable to POST request as @Dmitri T mentioned.
    – NarendraR
    Commented May 14, 2018 at 11:31

1 Answer 1


You need to consider a different structure of your test to make it behave like a real browser:

  • Open Login Page (HTTP Get Request)
    • Extract _csrf_token value from the response and save it into a JMeter Variable
  • Perform Login (HTTP Post request). At this stage you need to provide credentials and _csrf_token from the previous request.

See How to Load Test CSRF-Protected Web Site article for more information with regards to bypassing CSRF protection in JMeter tests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.