# Assert In

Asserts that the element identified by a given expression matches at least one item from a given list.


Name Type Required? Description Default value
Expression Expression Yes Path to the element to be compared with the items in the list; for example payload.productId.
Value String Yes The items that the specified element is to be compared with. Click anywhere in the field, enter the first item, then click the + icon to add further items. Alternatively, you can enter the items as a comma separated list.
Type Selection list No The data type of the value. If you do not specify a data type, the values are compared as strings. Select one of the following values:
  • integer: the values are evaluated as whole numbers.
  • float: the values are evaluated as decimal numbers.
Mode Selection list No Select one of the following values:
  • all: If the path expression matches multiple elements in the payload then they must all match the assertion.
  • one: Only one of the matching elements in the payload needs to match the assertion.
Level Selection list No Select error or warning. Specifies whether, if the assertion fails, it should be considered an ‘error’ or just a ‘warning.’ A warning does not trigger alerts, such as email or text messages. error
Modifier Selection list No Select not to negate the assertion; the assertion is considered verified if it does not pass. None
Execute if item exists Selection list No Select true or false. If true, the assertion is evaluated only if the element exists. This is useful when the element does not always exist. false
Stop test if fails Selection list No Select true or false. If true, the test is immediately stopped if the assertion fails. false
Assertion comment String No An optional comment for information.