Search code examples
asp.nettestingloadjmeterparameterized

JMeter: "__VIEWSTATE" and "__EVENTVALIDATION" value does not get replaced after extracting values using Regular Expression Extractor Post Processor


I am trying to load test the ASP.net website and after a bit of research, it became apparent that JMeter was running into issues with VIEWSTATE, which is one of the workarounds ASP.NET WebForms uses to make HTTP appear to be stateful. JMeter is sending a stale value for VIEWSTATE since it is replaying the HTTP requests in the test plan. I extracted the VIEWSTATE from each response and re-include that value on requests. I did it with two Regular Expression Extractors but I still don't see values getting replaced after parameterization.

enter image description here

enter image description here


Solution

  • Your regexp is probably wrong.

    It's better to use css/jquery extractor instead of regexp in this case

    Just put: - expression : input[id=__VIEWSTATE] - attribute : value

    and for second one:

    • expression : input[id=__EVENTVALIDATION]
    • attribute : value