Vugen - Correlating ASP.NET ViewState with Correlated Value
I'm load testing an ASP.NET application and have a question on correlating ViewState. If anyone can provide some advice or point me in the correct direction, it would be greatly appreciated.
I have the following scenario:
1) Web Request - inserts a new record in the database, a new primary key ID is created
2) The new PK ID is used in subsequent URL's in my recorded VuGen script
3) Correlating this new PK ID, replaces the recorded ID's properly in the Vugen script. This PK ID must be used for the rest of the script. Correlation works great with the ID's I can see in the script.
4) This is where the issue is. When playing back and tracing the database calls, I found out that the developer manually saved the PK ID in to viewstate. So when I trace the DB calls, I can see that the Originally recorded PK ID is being used in these calls to the database, which is incorrect as I want it to use the new PK ID every time this script runs for each VUser.
This is where my question is. Is there any way I can correlate the viewstate in order for the recorded script to replace/correlate the PK ID inside viewstate?
Re: Vugen - Correlating ASP.NET ViewState with Correlated Value
Yes you can correlate the view state in your script, use below function:
web_reg_save_param("Cor_ViewState", "LB=__VIEWSTATE\" value=\"", "RB=\"", LAST);
And also increase the size of web_reg_save_param by adding web_set_max_html_param_len("1000000"); in beginning of your script.
to find view state value is not vary easy because of its large size, you can use download this excel utility which helps you in finding correlation values: