Share via


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

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

You record a Web performance test by creating a new Web performance test in Visual Studio. The Web performance test activates the integrated Web Performance Test Recorder and starts Internet Explorer. The Web Performance Test Recorder is installed as part of Visual Studio Ultimate. It is used to record the actions that you perform while you browse a Web site. As you move through the site, recorded requests are added to the Web performance test.

After you have recorded a Web performance test, you can change the test and add properties to the test by using the Web Performance Test Editor. For more information, see How to: Edit an Existing Web Performance Test Using the Web Performance Test Editor. You cannot edit your Web performance tests until recording is stopped.

The Web Performance Test Recorder does not capture traffic that is sent between the client and server. This type of tool is also known as proxy recorder. Therefore, dependent requests, such as images, CSS, and JavaScript, are not recorded. Instead, the Web Performance Test Results Viewer determines dependent requests at run time. This leads to a more adaptable test that is not cluttered with requests for images.

Promoting Dynamic Parameters

When you run a Web application, the application dynamically generates data, such as a session ID. Frequently, Web applications also send dynamic data in query string parameter values and form post parameter values. A Web performance test can use such a generated parameter value by capturing it from the HTTP response by using an extraction rule and then binding it to a subsequent HTTP request. This capture and binding sequence is known as the promotion of dynamic parameters. Dynamic parameter promotion can prevent many cases of playback failure.

After you finish recording a Web performance test, you can detect whether dynamic parameters exist, and then choose to promote some of all of them, as described in the following procedure.

Recording a Web Performance Test

To record a Web performance test

  1. Open a Test project. For more information about how to create a test project, see How to: Create and Configure Test Projects for Automated Tests.

  2. On the Test menu, click New Test.

    The Add New Test dialog box is displayed.

  3. Select Web Performance Test.

  4. In the Test Name box, type an appropriate name. Do not change the .webtest extension. When you are finished, click OK.

    The Web Performance Test Recorder opens inside a new instance of Internet Explorer.

  5. Go to the site that you want to test, generally a non-production Web site, and notice the URLs that are listed in the Web Performance Test Recorder.

    Note

    Typically, Web performance tests are used to test a Web application that is under development and not yet ready for production. Therefore, it is assumed that you have such a Web application.

  6. (Optional) Click more links to record additional pages.

    Visual Studio displays the recorded Web performance test in the **Web Performance Test Editor **as it is being recorded. After you stop the recording, you can edit the test.

  7. Click Stop to stop recording and close Internet Explorer.

    A dialog box displays the message Detecting dynamic parameters. It also displays a progress bar that shows the status of parameter detection in the HTTP responses that were received.

    If no dynamic parameters are detected, the dialog box displays the message Did not detect any dynamic parameters to promote. The dialog box then closes.

    If dynamic parameters are detected, the Promote Dynamic Parameters to Web Test Parameters dialog box appears. This dialog box contains a table that lists the dynamic parameter values that were found, if any. You can now promote them to Web test parameters. Each row shows one parameter value that you can choose to promote.

  8. (Optional) In the Promote Dynamic Parameters to Web Test Parameters dialog box, select check boxes for the promotions that you want to apply when you run the Web performance test, and click OK.

    Note

    For more information about isolating dynamic parameters that are causing playback issues in your Web performance test, see Resolving Web Performance Test Result Viewer Playback Issues in Web Performance Tests

  9. On the File menu, click Save to save the newly recorded Web performance test.

Request Properties

The tree of nodes that contains URLs in the Web Performance Test Editor is called the request tree. You can select nodes in the request tree to view the properties associated with each request after the test is recorded.

Note the following about the requests that are captured:

  • The Query String parameters and the Form Post Parameters were detected and automatically generated into the test. You can view the transport method property, GET or POST in the Visual Studio Properties window for each request of a Web performance test.

  • When recording is finished, the Web Performance Test Recorder automatically detects the use of hidden form fields. You can add an ExtractHiddenFields extraction rule to a request that contains hidden fields. The extraction rule will capture the hidden field values in the context of the Web performance test. The hidden field values that were sent back to the Web server can be replaced with content-binding to those context parameters. This allows the test to use the correct hidden field values at run time which is necessary for hidden fields that contain unique identifiers, including VIEWSTATE. For more information, see How to: Add an Extraction Rule to a Web Performance Test.

  • Images are not recorded. Instead, because the Parse Dependent Links property of the request is set to True, the page is parsed to determine the set of dependent requests on the page, such as images, CSS, and JavaScript. For more information, see How to: Edit an Existing Web Performance Test Using the Web Performance Test Editor.

  • Redirects are not recorded. Redirects are followed automatically when the test is run.

See Also

Tasks

How to: Add an Extraction Rule to a Web Performance Test

How to: Edit an Existing Web Performance Test Using the Web Performance Test Editor

How to: Add a Web Recording to an Existing Web Performance Test

Other Resources

Creating and Editing Web Performance Tests

Resolving Web Performance Test Result Viewer Playback Issues in Web Performance Tests