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
Setting up properties
This assertion works in two modes: Text and Other Property.
Text mode
-
Select Text in the Target drop-down list.
-
Specify the value for the comparison in the Target Text edit box.
-
Enable additional options if you need them:
Option Description Ignore Case Ignores the value’s case during the comparison.
Other Property mode
-
Select Other Property in the Target drop-down list.
-
Select the object whose property you need to use for the comparison in the Target Object drop-down list.
-
Select the property for the comparison in the Target Object Property drop-down list.
-
Enable additional options if you need them:
Option Description Ignore Case Ignore the value’s case during the comparison.
Examples
-
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.
Other assertions for content
Add more assertions for response and request contents: