Structured JSON validation
33-json-assertions.yaml
HTTP(S)
What this example does
This example demonstrates structured json validation.
Checks and behavior
- Sends an GET request to https://api.example.com/health.
- Inspects structured JSON response values.
Adapt example domains, addresses, credentials and thresholds to your environment before use.
YAML configuration
name: Structured JSON validation
url: https://api.example.com/health
tests:
json:
paths:
- path: status
equals: healthy
- path: database.connected
equals: true
- path: services
min_items: 2
- path: version
exists: true
- path: error
exists: false