Equals Assertion

Applies to ReadyAPI 3.56, last modified on November 21, 2024

The Equals assertion checks whether the property value equals the specified value.

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 properties. See Working With Assertions in Functional Tests.
Security tests The response properties. 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 Equals assertion or select it manually in the Property Content 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 Equals assertion or select it manually in the Property Content category.

Setting up properties

This assertion works in two modes: Text and Other Property.

Text mode

  1. Select Text in the Target drop-down list.

    ReadyAPI: Configuring the Equals assertion

    Click the image to enlarge it.

  2. Specify the value for the comparison in the Target Text edit box.

  3. Enable additional options if you need them:

    Option Description
    Ignore Case Ignores the value’s case during the comparison.

Other Property mode

  1. Select Other Property in the Target drop-down list.

    ReadyAPI: Configuring the Equals assertion to compare wit another property

    Click the image to enlarge it.

  2. Select the object whose property you need to use for the comparison in the Target Object drop-down list.

  3. Select the property for the comparison in the Target Object Property drop-down list.

  4. Enable additional options if you need them:

    Option Description
    Ignore Case Ignore the value’s case during the comparison.
  • In Text mode: Specify the value in the Target Text edit box to find out whether the response contents are equal to it, for example:

    <City>Beverly Hills</City>
  • In Other Property mode: Select the test item and the property you need. The assertion will fail if the response content is not equal to that property.

Add more assertions for response and request contents:

See Also

Property Content Assertions
Equals Binary Assertion

Highlight search results