Prakash R
Prakash R

Reputation: 119

Regex in JMeter is not possible

I have following request samplers (dynamic values included) in my JMeter test case,

enter image description here enter image description here

I have tried regular expression method using Regular Expression Extractor plugin in my test case and till now the result is failed. The regular expression myself mentioned in the test case is,

"authenticity_token" type="hidden" value="(.*?)"

But it won't works, So can anyone please give a solution for this. For reference I have mentioned the regex results for the post data.

enter image description here

enter image description here

Thanks in advance

Upvotes: 1

Views: 106

Answers (1)

Vadim Yangunaev
Vadim Yangunaev

Reputation: 1991

Check the previous request, before login, from where your script should get the token.
You may use View Results Tree listener while recording this script and see, where is you get this token and test your RegExp in this response with XPath Tester view.

Check Authentication Using JMeter guide to get additional information.

Upvotes: 1

Related Questions