I was trying to perform the performance testing using JMeter on view state base application, but I'm not able to get a successful response.

As of now I'm able to record the browser action, but after recording, when I try to run the recorded script I'm not getting correct response.
Question: Is there any better tool to perform the performance testing of view state based application?

enter image description here

This is the image, on the bottom of the image is the format of the response, so how should I extract the values?


View State is one of client-side state management techniques, if you want to load test application which uses this technique - it means that you will not be able to successfully replay a recorded script without prior correlation.

You should design your test as follows:

  • Request 1 - open first page

  • Request 2 - replace recorded hard-coded ViewState value with the JMeter Variable from the previous step. Once done the request should be successful.

You can check out ASP.NET Login Testing with JMeter article for example of ViewState handling in JMeter

  • Thank you @Dmitri for your response, but i'm not able to fetch the 'EventValidation' value just because it is written in text, so how i fetch the EventValidation value from response. For reference i have attach a screen shot in question. Dec 30 '19 at 14:08
  • If it's a text (and I doubt that it is the case, my expectation is that it is a hidden input) then you should be able to get it using Regular Expression Extractor
    – Dmitri T
    Dec 30 '19 at 15:24

You need to use correlation to store ViewState, EventValidation, and possibly other values (Session, Key, ViewStateGen, etc) inside vars. As mentioned above, this can be done using the Regex extractor.

I have written jmeter scripts where the ViewState changes for every page transition in the workflow, so you might need to use multiple vars for ViewState. Make note of where these values change and reuse these vars where appropriate.


  1. Login -Regex extractor stores returned ViewState as ViewState1

  2. HomePage => access using ${ViewState1} -Regex extractor stores returned ViewState as ViewState2

  3. AccountPage => access using ${ViewState2} -Regex extractor stores returned ViewState as ViewState3

  4. And so on...

Here is an example of how to capture the EventValidation using a Regex extractor:


  • i'm not able to extract the EVENTVALIDATION value as it is mention in above question, how to extract the test value of only EVENTVALIDATION? Dec 31 '19 at 10:53
  • Please see screenshot that I attached. __EVENTVALIDATION|(.+?)| is the regular expression in this example. If this does not work for your site, please try adjusting the regular expression. I cannot see the escape character in your screenshot, I am assuming that it is a pipe |
    – ToastMan
    Dec 31 '19 at 13:51

I've used WebLoad before. Its scripting language is basically JS, so you may be able to find controls on the page using JS and invoke them as part of your load script.

WebLoad is free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.