Dela via


How to: Promote Dynamic Parameters to Web Performance Test Parameters

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic applies Topic does not apply Topic does not apply Topic does not apply

Some Web sites and applications use dynamic parameters in one or more of their Web requests. A dynamic parameter is a parameter whose value is generated every time that a user runs the application. A dynamic parameter can cause your Web performance test playback to fail because the dynamic value will likely be different every time that the test is run. Therefore, you cannot play back recorded values. An example of a dynamic parameter is a session ID. The session ID usually changes every 5 to 30 minutes.

The Web performance test recorder and playback engine automatically handle the most common types of dynamic parameters:

  • Dynamic parameter values set in cookie value. The Web performance test engine automatically handles these during playback.

  • Dynamic parameter values set in hidden fields on HTML pages, such as ASP.NET view state. These are automatically handled by the recorder adding hidden field extraction rules to the test.

  • Dynamic parameter values set as query string or form post parameters. These are handled through dynamic parameter detection when the test completes.

The default Visual Studio 2010 Ultimate configuration is to detect dynamic parameters when you record a Web performance test using the Web Performance Test Recorder. However, if you have Visual Studio 2010 Ultimate configured not to detect dynamic parameters, or the Web application being tested gets modified with additional dynamic parameters, the Web Performance Test Editor provides the ability to detect dynamic parameters in the Web performance test.

Note

You can change the default behavior for detecting dynamic parameters when you run a Web performance test in Visual Studio 2010 Ultimate. For more information, see How to: Configure Visual Studio Ultimate Options for Web Performance Tests.

In the Web Performance Test Editor, you can use the Promote Dynamic Parameters to Web Test Parameters button on the toolbar to automatically detect the dynamic parameter types listed above in your Web performance test as described in the procedure below.

To detect dynamic parameters in your Web performance test

  1. Open a Web performance test.

    The Web Performance Test Editor opens and the request tree for the Web performance test is displayed.

  2. In the toolbar, click the Promote Dynamic Parameters to Web Test Parameters button.

    After the detection process completes, if any dynamic parameters are detected, the Promote Dynamic Parameters to Web test parameters dialog box appears.

    The dynamic parameters are listed under the Dynamic Parameters column. The requests that the dynamic parameter will be extracted from and bound to are listed under the Extract Parameter from Response and Bind to Request columns.

    Tip

    If you click on a dynamic parameter in the Promote Dynamic Parameters to Web test parameters dialog box, two requests will be highlighted in the Web Performance Test Editor request tree. The first request will be the request that the extraction rule will be added to. The second request is where the extracted value will be bound.

  3. Select or clear the check box next to the dynamic parameters you would like to automatically correlate. By default, all the dynamic parameters are checked.

  4. Click OK.

    Note

    There are some forms of dynamic parameters that are not detected. To handle these parameters properly, you can add extraction rules to dynamic parameters in your Web performance tests manually. For more information, see How to: Resolve Web Performance Test Playback Issues Caused by Dynamic Parameters.

See Also

Tasks

How to: Create a New Web Performance Test Using the Web Performance Test Recorder

How to: Resolve Web Performance Test Playback Issues Caused by Dynamic Parameters