Skip to content
DevTest Solutions - 8.0.1
Documentation powered by DocOps

Ensure Result Contains

Last update January 14, 2015

The Ensure Result Contains assertion lets you ensure that a JSON Path result that is either a JSON object or a JSON array contains any or all of the values in a specified list.

Complete the following fields:
  • Name

    Defines the name of the assertion.

  • If

    Specifies the behavior of the assertion from the drop-down list.

  • then

    Specifies the step to which to redirect if the assertion fires.

  • Log

    Identifies event text to print if the assertion fires.

  • JSON Path
    Designates an expression that consists of a sequence of JSON properties in a JSON document. The JSON Path represents a path to a destination JSON property.
  • Contains all expected values or Contains any expected values
    Defines the parameters with which to match the JSON Path and the Expected value. If you select the Contains all expected values check box, the JSON Path result must include all values in the Expected value list to pass the assertion. If you select the Contains any expected values check box, the JSON Path result must include at least one value in the Expected value list to pass the assertion.
  • Expected value
    Defines a list of values that the JSON Path result must include. To stop editing values in the Expected value field, hold down Cntl and click Enter. For an OS X system, hold down Command and click Enter.
  • Ignore order of array elements
    Two JSON arrays with the same set of elements but different element order are considered equal in comparison.
  • Run Assertion
    To run and execute the filter, click Run Assertion.
Was this helpful?

Please log in to post comments.