Expected Codes Panel

Applies to LoadComplete 4.97, last modified on May 20, 2019

About the Panel

To determine whether a request was simulated successfully, LoadComplete compares the response code received from the server during the test run against the expected response code the scenario specifies. If the response codes differ, LoadComplete posts a warning to the test log.

In the Expected Codes panel of the operation editor, you can configure how LoadComplete will treat this or that response code: Warning, Error or OK (success). For example, you can command LoadComplete to treat the response code 307 for the request as an error (307 - Temporary Redirect).

Note: If a request is redirected unexpectedly during simulation (though it was not redirected during the recording), LoadComplete will validate the code of the successive server response rather than the actual 3xx Redirection response. To learn more, see Handling Unexpected Redirects.
If a request is declined unexpectedly during simulation due to the absence of credentials (though it was accepted during the recording), and a 401 Unauthorized response is received, LoadComplete will attempt to send an authentication request automatically. If the authorization passes, LoadComplete will validate the code of the successive server response rather than the initial 401 Unauthorized response. To learn more, see Automatic Authentication.

LoadComplete uses the panel for these operations:

  • Scenario (a top-level node in a scenario)
  • Request (HTTP requests)
  • WebSocket Connection (a request that establishes a WebSocket connection is a regular HTTP request that includes WebSocket-specific data.)
Expected Codes Panel in the Request Operation Editor

Click the image to enlarge it.

For requests, the panel resides on the Response page of the request editor

Expected Codes Panel in the Scenario Operation Editor

Click the image to enlarge it.

For scenarios, the panel resides on the Expected Codes page of the Scenario operation editor

In the Request operation editor, you can change the panel’s location within the editor as your needs dictate. See Docking.

Expected codes you set for the Scenario operation will be applied to all requests in the scenario.

Setting Result Rules

Information on Response Codes

Creating, Editing and Deleting Rules for Response Codes

To create a new rule

To edit a rule

To delete a rule

See Also

Setting Expected Response Codes
Request Operation
WebSocket Connection Operation
Scenario Editor - Common Tasks

Highlight search results