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.
Asked
Active
Viewed 3,002 times
1
-
can you show your test plan and where you placed extractors ? can you also tell if value is replaced by Default Value in your extractor or by something else ? – UBIK LOAD PACK Sep 26 '15 at 06:48
-
Yes, the value is getting replaced with Default Value. – Anonymous Sep 26 '15 at 06:51
-
I have just added Test Plan image in question, please let me know where do I need to place Regular expression extractor. – Anonymous Sep 26 '15 at 06:58
2 Answers
1
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

UBIK LOAD PACK
- 33,980
- 5
- 71
- 116
-
Thanks a lot UBIK, this solution works, however I would also like to know at what step I am wrong using Regular Expression Extractor. – Anonymous Sep 26 '15 at 07:07
-
Can you open another question asking this "How to know why my regular expression extractor in JMeter is not extracting the data ", I would like this to be in a dedicated question so that others can find it easily. Put in your question the response, the plan, the regexp extractor screenshot so that I can answer – UBIK LOAD PACK Sep 26 '15 at 13:21
-
Sure. Please check. http://stackoverflow.com/questions/32797774/jmeter-how-to-know-why-my-regular-expression-extractor-in-jmeter-is-not-extract – Anonymous Sep 26 '15 at 13:36
0
Use the below regex..it worked for me
input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="([A-Za-z0-9+=/-_]+?)"

Robin Charles
- 1
- 2