HTTP Header Exists (Deprecated)

Applies to ReadyAPI 3.9, last modified on July 30, 2021
The HTTP Header Exists 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 HTTP Header Exists assertion checks whether the header with the name you have specified exists in the request or response.

This assertion works with test steps and virtual APIs that receive HTTP messages in the response.

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 request or response header. See Working With Assertions in Functional Tests.
Security tests The response header. See Security Assertions.
Virtual services The request header. See Assertions in Virtual Services.

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 HTTP Header Exists 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 HTTP Header Exists assertion or select it manually in the Compliance, Status and Standards category.

Follow these steps:

Virtual service: The Assertions panel

Click the image to enlarge it.

  1. Open a virtual service.

  2. Open the Assertions drop-down panel.

  3. Click in the Assertions panel

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

Setting up properties

Specify the header name. To check multiple headers, add more Header Exists assertions.

ReadyAPI: Configuring the HTTP Header Exists assertion

Click the image to enlarge it.

See Also

Smart Assertion
Compliance, Status and Standard Assertions
Header Equals Assertion

Highlight search results