Specifying the expected response size

Response size verification points verify that the number of bytes returned in a response is what you expected. If the byte count does not match, the test log reports a failed verdict event. You can specify an exact response size or verify that the byte count is within a range.

Procedure

  1. In the Test Navigator, browse to the test and double-click it.
    The test opens.
  2. Right-click the test name, a test page, or a request, and select Enable Response Size VPs
    Your choice determines whether the verification point is added to all test pages, to a page in the test, or to a particular request. The following figure shows a response size verification point within a test:response size verification point within a test
    Note: When you modify a test, the modified items appear in italic type. The italic type changes to regular type after you save the test.
  3. Click the verification point to display the response size editing fields in the Test Element Details area.

    Responses to HEAD requests, by definition, have no contents; the size is always 0.

  4. To disable an individual response size verification point, clear the Enable verification point field.
  5. From the Select matching method list, click an option to indicate how closely the response size that is returned in the page request must match the recorded response size.
    • The default matching method for a primary request is Range, with a percentage adjustment based on the value in the field on the right. (You can change the percentage basis as well as the matching method.) When the test is run, an error is reported if the actual response size falls outside the adjusted range.
    • For other requests, the default matching method is Exact. When the test is run, an error is reported if the response size does not exactly match the expected size.

What to do next

You can also change the preferences so that Response Size verification points are set automatically. To do this:
  1. Change subsequent tests that you record. Click Window > Preferences > Test > Test Generation > HTTP Test Generation > Verification Points, and select HTTP Response Size. This changes subsequent tests that you record.
  2. Optionally, regenerate existing tests with the changed preference, as shown in Generating a new test from a recorded session.