JMeter not passing set-cookie: XSRF-TOKEN in login
SivEng Orn <[email protected]> Wed, 14 Feb 2024 10:27:03 +0700
| Newsgroups | gmane.comp.jakarta.jmeter.user |
|---|---|
| Message-ID | <CALCVyc8sYJ15M0FDhBELbqvayEnMwRP4JrzuQ-N8AHFOuGvv9Q@mail.gmail.com> |
I have 2 requests in my threadGroup after recording from Postman. One is
the head method for getting CSRF cookies. Second is for login.
[image: image.png]
Getting csrf-cookies request is success, but the login request fails with
500 status internal server error. I checked the response header of the
login, it's missing one set-cookie: XSRF-TOKEN compared to the postman. In
postman both of my requests are successful. I don't know why the login in
JMeter is not working.
I also add the CookieManager.check.cookies=false and
CookieManager.save.cookies=true to User.properties.
I also tried to add ${COOKIE_XSRF-TOKEN} to my login header manager. I also
tried using regular expression to extract the XRSF-TOKEN from the response
header of csrf-cookie head method request and pass the value to the login
header manager. But none of them are working.
Here is my test plan. I'm using JMeter 5.6.2
[image: image.png]
Any suggestions?
image.png
(image/png, 6.3 KB) - not displayed
image.png
(image/png, 156.8 KB) - not displayed