Skip to content

JSON path assertions

Check a value inside a JSON response: existence, equality, and numeric comparison, with clear failure behavior.

Core

Configuration

Point a JSON path at a field in the response body and choose how to compare it.

OperatorPasses when
Path existsThe field is present
Path does not existThe field is absent
EqualsThe value equals the expected value
Number at least / at mostA numeric value is within bounds

Example

Response body
{
  "status": "ok",
  "queue": { "depth": 3 }
}

A path of queue.depth with number at most 100 passes for this response.

Failure behavior

  • Missing path: the assertion fails when it expected the field to exist.
  • Type mismatch: comparing a number operator against text fails.
  • Invalid JSON: if the body is not JSON, JSON assertions fail.

Was this page helpful?