Handling ASP.NET MVC’s Anti-Forgery Tokens when load testing with JMeter
JMeterでクッキー使うときにクッキーマネージャかませばいいんだけど、ASP.NETのときに正規表現フィルタでRequestVerificationTokenの値を取って埋める必要がありまっせと言う話。
Some key points to note:
- The Reference Name field names the variable that we will then reference in the POST request we make to login.
- The Regular Expression field tells JMeter that we want to extract the value from the string using:
name="__RequestVerificationToken" type="hidden" value="([A-Za-z0-9+=/\-\_]+?)"