Configuration
Point a JSON path at a field in the response body and choose how to compare it.
| Operator | Passes when |
|---|---|
| Path exists | The field is present |
| Path does not exist | The field is absent |
| Equals | The value equals the expected value |
| Number at least / at most | A numeric value is within bounds |
Example
{
"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.