Reputation: 33
My script get an authenticity token from first page, then pass it to the second page I got this error when running the test:
{"errors":{"error:":["ActionController::InvalidAuthenticityToken"]}}
I checked the token variable, apparently the string such as /, = has been encoded into %2F and %3D etc..
On my second page's HTTP request window, I have NOT selected "encoded" for token variable defined in the "Send parameters with the request" section.
Apparently the problem is I did not asked for encoded variable, JMeter just encode it. Is it a known bug or I should do something to decode it or is there a work around on this issue?
Upvotes: 0
Views: 1026
Reputation: 384
Did you pass token in POST data?
I'v faced the same problem and just pass body data as work around, to do it you need:
Body data example:
username=Some_name&token=AbRaCaDaBrA
NB, if something need to be encoded, you'll have to do it manually.
Upvotes: 1