Specifying the expected content

Content verification points verify that the response contains—or does not contain—an expected string. If the content returned is unexpected, the test log returns a failed verdict event. You can create a content verification point from specific response text.


To create a content verification point from a response or a portion of a response:

  1. In the Test Navigator, browse to the test and double-click it. The test opens.
  2. Click the response that contains the contents that you want to use for the verification point. If you do not see the contents, press Ctrl+Shift+Spacebar in the Test Element Details area, under Content.
  3. Select the content for the verification point, right-click, and select Add to Content Verification Point. The content verification point and the selected string are displayed in the Test Contents area.
  4. Edit the new content verification point as needed. You can use the Add, Insert, and Remove buttons to manipulate content verification points and content verification point strings. After you select a content verification point or content verification point string in the editor, you can also edit the verification points and strings by using the controls in the Test Element Details area. For example, you might want to change part of the hard-coded response contents to a regular expression. To substitute from any data source that exists in the test, select the entire string or a portion of the text string, and then right-click, and select Substitute.
    Note: Responses to HEAD requests, by definition, have no content. Therefore, a content verification point that attempts to match a string in a response to a HEAD request will fail.