Export (0) Print
Expand All

How to: Add a Validation Rule to a Web Performance Test

Validation rules help verify that a web application is working correctly by validating the existence of text, tags, or attributes on the page returned by a web request. Validation rules can also verify the amount of time it takes a request to finish, and the existence of form fields and their values. For more information, see Using Validation and Extraction Rules in Web Performance Tests.

You add validation rules to web performancew Web performance test, see Customizing Web Performance Test Recordings Using Web Performance Test Editor.

Requirements

  • Visual Studio Ultimate

To add a validation rule to a web performance test

  1. Open a web performance test.

    For more information about how to create a web performance test, see Creating and Editing Web Performance Tests.

  2. In the Web Performance Test Editor, select the request to which you want to add a validation rule.

  3. Right-click the request and select Add Validation Rule.

    The Add Validation Rule dialog box is displayed.

  4. In the Add Validation Rule dialog box, select a rule to configure, for example select Find Text. Find Text is a validation rule that looks for a specific string in the HTTP response to your request. For information about other predefined validation rules, see Using Validation and Extraction Rules in Web Performance Tests.

  5. For the Find Text property, type a string that you expect to appear in the response body when the test runs.

  6. Set the Pass If Text Found property to True.

  7. Choose OK to close the Add Validation Rule dialog box.

  8. On the File menu choose Save to save the web performance test.

  9. In the Web Performance Test Editor, choose Run to start your web performance test.

    The Web Performance Test Results Viewer is displayed.

  10. In the top pane of the Web Performance Test Results Viewer, choose the request to which you added the validation rule.

  11. In the bottom pane of the Web Performance Test Results Viewer, choose the Details tab.

    The Validation and Extraction Rules grid is displayed with an entry for the validation rule you just added. Verify that the validation rule worked as expected.

Show:
© 2015 Microsoft