Facilitate the testing of web applications created in ASP.NET

Web applications implemented in ASP.NET use several parameters to pass session-specific data between the client and the server. This is done to implement the partial page update instead of refreshing the whole page with a postback.

The ViewState value is used for such client-side state management. It can store page values at the time of postback.The EventValidation value is used as a security measure against the injection attacks via the changing POST values. The server checks that a postback is valid and rejects bad ones.

Both values are usually changing multiple times during each user session and should be passed correctly with each HTTP request. In some cases this is done automatically through the hidden form parameters, however in case your session uses UpdatePanel or works with multiple application views simultaneously, it will require the Module for ASP.net testing for the correct work without the manual parameterization of those values. This module adds the following functionality to WAPT or WAPT Pro:

    • Two internal functions for the extraction of the ASP.NET-specific values from the server responses;
    • Automatic parameterization with help of those additional functions ensuring the correct substitution
      of dynamic values in all cases independently from the notation used to pass the data;
    • The recorded profile does not require additional parameterization work to execute ASP.NET sessions correctly.


Automatic parameterization in action

The following example demonstrates this from the technical point of view. A page with a calendar control was recorded with and without the module. The module created two additional variables for each of the values, extracting them with the special functions.

Two ASP.net variables are created

Created variables are used for the automatic parameterization of those values in the subsequent request.

Automatic parameterization of ASP.net variables

As a result, there is a significant difference in the server responses with and without the module.

ASP.net server responses comparison

While the module always passes fresh values expected by the server, without the module the initially recorded outdated ones are passed again and again resulting in an error.