Skip to main content

Assertions

Assertions validate that step outputs match expected values. They catch regressions early and document the expected behaviour of your system.

Basic Syntax

Each assertion rule specifies a path to target, an operator, and an expected value.
You can also use the object form:

Assertion Operators

JSONPath in Assertions

Assertions use the same JSONPath syntax as extraction:

Variables in Expected Values

Expected values can reference state variables:

Assertions on Different Step Types

HTTP

Shell

Database

Ignoring Assertion Failures

Combine with ignore_error to allow optional assertions:

How Assertions Work

  1. The step executes and produces a result value
  2. The assertion engine resolves {{ variables }} in expected values
  3. If a path is specified, it resolves the JSONPath against the result
  4. The operator compares the resolved value against the expected value
  5. If the comparison fails, the step is marked as failed (unless ignore_error)
The assertion engine is type-aware for numeric comparisons: "5" == 5 evaluates to true.

What’s Next?