Asserts that the value of the element identified by a given expression matches a specified format.

Parameters

Name Type Required? Description Default Value
Expression Expression Yes Path to the element that you want to examine; for example, `payload.productId`.
Type Selection list Yes Select one of the following values:
  • regex: Evaluate the element value as a regular expression, as specified in the Regex value parameter.
  • US states: Check if the element value is a valid US State; for example, ‘NY’.
  • US zipcodes: Check if the element value is a valid US Zipcode.
  • credit card: Check if the element value contains a valid credit card number from the most popular credit cards.
  • country codes: Checks if the element value contains a valid country code.
  • currency codes: Checks if the element value is a valid currency code.
Regex
Regex value String Yes, if value of the Type parameter is regex Specify the regular expression you want to use for checking the expression.
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.
All
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.