Jmeter capture x-csrf-token
Nov 23, 2021
When one creates a jmeter test after few months in between, capturing csrf token bites us — least it is searching to find the right way to set up X-XSRF-TOKEN header and worst huge time sink
Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)CookieManager.save.cookies=true
Restart JMeter to pick up the changeAdd HTTP Cookie Manager to your Test PlanAdd HTTP Header Manager to your Test Plan and configure it to send the following header:Name: X-XSRF-TOKEN
Value: ${COOKIE_XSRF-TOKEN}