How to: Extract a Web Test

You can create new Web tests by extracting individual requests from an existing Web test. You can use this to factor your Web tests into reusable test components. For example, you could factor a shopping application into log in, browse, buy, and log out components. For more information, see Walkthrough: Creating a Web Test that Requires a Login and Logout.

To extract new Web tests from an existing Web test

  1. In the Web Test Editor, open a Web Test.

  2. In the request tree, locate the root node that is the name of the Web Test. Right-click the root node and then click Extract Web Test.

    - or-

    In the request tree, right-click a specific request and then click Extract Web Test.

    The Extract Web Test dialog box appears.

  3. In Web test name type a name for the new Web test component.

    In the Choose first item for the Web test list select the first request that you want to include in the new test.

  4. In the Choose last item for the Web test list select the last request that you want to include in the new test.

  5. Select or clear the Extracted test inherits test level properties check box.

    You can use this to automatically copy the test level properties to the new extracted test.

  6. Select or clear the Copy test level plug-ins and validation rules check box.

    You can use this to automatically copy the test level plug-ins and validation rules to the new extracted test.

  7. Click OK.

    A new Web test is created that has the specified name. In the Web Test Editor the new test is added to the request tree in place of the individual requests that you extracted. In Solution Explorer, the new test is added to the project list.

  8. (Optional) Repeat steps 2 through 5 to create additional tests.

  9. On the File menu, click Save All.

See Also

Tasks

How to: Insert a Call to Another Web Test

How to: Record a Web Test

How to: Edit an Existing Web Test

Concepts

Running and Viewing a Web Test