Invalid HTTP Status Codes Assertion (Deprecated)

Applies to ReadyAPI 3.10, last modified on October 07, 2021
The Invalid HTTP Status Codes assertion has been superseded by the Smart Assertion and is deprecated as of ReadyAPI 3.9.0. It will remain available for the time being, but we suggest that you switch to the Smart Assertion.

The Invalid HTTP Status Codes assertion checks whether the target test step received the HTTP result with a status code which is not on the list of defined codes.

This assertion works with test steps which receive HTTP messages.

Availability

This assertion is available in multiple ReadyAPI applications. Depending on the application, it validates the following data:

In... Checks... To learn more...
Functional tests The response HTTP status codes. See Working With Assertions in Functional Tests.
Security tests The response HTTP status codes. See Security Assertions.

Create an assertion

Follow these steps:

Functional test: The Assertions panel

Click the image to enlarge it.

  1. Open a test step.

  2. Click Add assertion.

In the New Assertions dialog, search for the Invalid HTTP Status Codes assertion or select it manually in the Compliance, Status and Standards category.

Follow these steps:

Security tests: The Assertions panel

Click the image to enlarge it.

  1. Open a security test.

  2. Click Response Assertion next to any scan.

  3. Click in the Assertions panel

In the New Assertions dialog, search for the Invalid HTTP Status Codes assertion or select it manually in the Compliance, Status and Standards category.

Setting up properties

Specify HTTP codes the target service should not return. To add multiple codes, separate them with a comma.

ReadyAPI: Configuring the Invalid HTTP Status assertion

Example

To fail the request when there is no content on the page, or it is partial, specify the following codes:

204,206

See Also

Smart Assertion
Compliance, Status and Standards Assertions
HTTP Download Resources Assertion
HTTP Valid Status Codes Assertion

Highlight search results