Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Describe JMeterTesting/ASPNETViewState here.

Wiki Markup
Testing ASP.NET Web pages will require two hidden fields (
+
_VIEWSTATE and
+
 _EVENTVALIDATION) to be passed for subsequent requests to a web page once the hidden fields have been set in the body. This can be achieved by creating two post Processor elements of the type 'Regular Expression Extractor' and then setting the details of the Regular Expressions as follows:
Wiki Markup

[BR][BR] Response Field to check: Body [BR] Reference Name: VIEWSTATE [BR] Regular Expression: id=\"__VIEWSTATE\" value=\"(\[\\w/-_\].+)\" [BR] Template: $0$
 [BR] Match No. : 1 [BR] Default Value: NOT FOUND [BR]

Wiki Markup
[BR] Response Field to check: Body [BR] Reference Name: EVENTVALIDATION [BR] Regular Expression: id=\"__EVENTVALIDATION\" value=\"(\[\\w/-_\].+)\" [BR] Template: $0$
 [BR] Match No. : 1 [BR] Default Value: NOT FOUND

Then in order to ensure these extracted values are passed in subsequent HTTP requests, for each request specify the following to be the Send Parameters for the Request:

Name: __VIEWSTATE Value: ${VIEWSTATE_g1}

Name: __EVENTVALIDATION Value: ${EVENTVALIDATION_g1}

 [BR] [BR] Then in order to ensure these extracted values are passed in subsequent HTTP requests, for each request specify the following to be the Send Parameters for the Request:
[BR] Name: _VIEWSTATE [BR] Value: $\{VIEWSTATE_g1\} [BR] [BR] Name: _EVENTVALIDATION [BR] Value: $\{EVENTVALIDATION_g1\} [BR]