I am testing website deployed based on Magenta Template Framework, the problem that occurred is that the cart kept being empty even the add to cart link has been ran. And furthermore, i kept getting the error "invalid form key please refresh key".
- Extract this
form_keyvalue from the previous response and save it into a JMeter Variable
- Replace previous (recorded/hard-coded) value with the variable from the step 1
Here how it looks like at i.e. Magento Online Demo instance:
and here is how you can extract it using i.e. CSS Selector Extractor
More information: How to Load Test CSRF-Protected Web Sites