Use property content assertions to validate the content of requests and responses.
Property Content assertions validate aspects of messages related to their XML, XPath, XQuery, and JSON contents.
Content Assertions
The Contains assertion searches for specified text in a request or response.
The Equals assertion checks whether the property value equals to some other value.
The Equals Binary assertion checks the binary identity of the response and some other response or file.
The Not Contains assertion searches for absent string tokens.
Message Content Assertion (Deprecated)
The Message Content assertion checks the content of messages and properties according to complex rules.
This assertion is deprecated. Use the Smart Assertion instead. |
The Smart Assertion checks the content of messages and properties as well as the metadata such as headers and the status code.
JSONPath Assertions
The JSONPath Count assertion uses a JSONPath expression to count the occurrences of an element in the request or response.
JSONPath Existence Match Assertion
The JSONPath Existence Match assertion uses a JSONPath expression to select content from the target property and check whether it exists.
JSONPath RegEx Match Assertion
The JSONPath RegEx Match assertion uses a JSONPath expression to select content from the target property and compare the result to a regular expression you have specified.
The JSONPath Match assertion uses a JSONPath expression to select content from the target property and compare the result to the value you expect.
Tip: To learn more about the JSONPath syntax, see JSONPath Reference.
XPath Assertions
The XPath Match assertion uses an XPath expression to select content from the target request or response node and compare it to the value you expect.
XQuery Assertions
The XQuery Match assertion uses an XQuery expression to select content from the target property and compare the result to the value you expect.