Node ReferenceFlow ControlIF Node

IF Node

The IF Node provides conditional logic, allowing you to execute different branches of your test flow based on a defined condition.

It is a group node that contains the “then” branch as its direct children. An optional “else” branch can be linked.

Configuration

  • clause: This contains the Predicate that will be evaluated.
    • expression: A JSONata expression that must evaluate to true for the “then” branch to be executed. The expression has access to the test context.
  • thenId / elseId: These are internal identifiers for the start of the “then” and “else” branches.

How it Works

  1. The JSONata expression in the clause is evaluated.
  2. If the result is true, the child nodes nested directly under the IF node are executed.
  3. If the result is false, the flow skips the child nodes and proceeds to the linked “else” branch, or to the node following the IF block if no “else” is configured.