You can use the following assertions to verify functioning of REST, SOAP and JMS virtual services:
||Checks if the incoming request body contains specific data. Fails, if the body has no such data.
||Checks if the incoming request body does not contain specific data. Fails, if the body contains this data.
Available for XML request bodies
|Message Content Assertion
||Lets you build a complex check that includes multiple smaller checks of XML data. Each smaller check can use its own condition and expected value.
||Checks if the incoming request body contains a specific node (element or attribute) and if the node value equals to the expected value. To extract data from the request body, the assertion uses an XPath expression.
||Checks if the incoming request body contains specific data. To extract data from the request body, the assertion uses XQuery code.
Available for JSON request bodies
Note: The following assertions use JsonPath expressions to extract data from the body of an incoming request.
||Counts the number of occurrences of a specific element in the incoming request body. Fails if this number differs from the expected value.
|JsonPath Existence Match
||Checks if the incoming request body contains a specific element.
||Extracts data from the incoming request body and compares it against an expected value.
|JsonPath RegEx Match
||Extracts data from the incoming request, applies regular expressions to it and compares the result with an expected value.
Compliance, Status and Standards
|HTTP Header Exists
||Checks whether the request contains a specific HTTP header. Fails if the request does not have this header.
|HTTP Header Equals
||Checks whether the request contains a specific HTTP header with a specific value. Fails if the header does not exists or has an unexpected value.
||Checks whether the request complies with a specific Swagger definition. Fails if the request does not comply with the definition.
||This assertion uses a Groovy script to perform arbitrary checks of incoming requests. The script should return
false to signal whether the assertion passes or fails.
Validating Virtual APIs