AI first API automation testing, on Hurl
Write each step as a small text file: log in, add to cart, pay. hurl-orchestra runs the steps in the right order, passes the login token to the steps that need it and shows you which step broke. Easy to read for you and for your AI assistant.
pip install hurl-orchestraTry it
Each box is one test file. A step starts only when the steps before it pass, and steps that do not depend on each other run at the same time. Click a box to make it fail, then see which steps stop and which continue.
wave 1
Each file lists the steps that must pass first in deps. hurl-orchestra finds the correct order. You do not write a script for it, and you do not copy the login request into each file.
---
id: profile
deps: [auth]
---
GET {{base_url}}/profile
Authorization: Bearer {{auth_token}}
HTTP 200
[Asserts]
jsonpath "$.user" == "ada"wave 2
The login step saves the token from the response and lists it in outputs. Each later step reads it as auth_token: the name of the step, then the name of the value.
---
id: auth
outputs: [token]
---
POST {{base_url}}/login
{
"user": "ada",
"password": "{{password}}"
}
HTTP 200
[Captures]
token: jsonpath "$.token"wave 3
Sometimes a test fails for a known reason, for example a busy shared database. Describe that failure in known_failures. The run still passes, the report still shows the failure, and the exception ends on its until date.
---
id: create_order
outputs: [order_id]
known_failures:
- name: db_pool_exhausted
reason: The shared test database is at its connection limit
until: 2026-12-31
link: https://example.com/runbooks/test-db-pool
status: 500
header:
name: X-Error-Code
pattern: '^ERR-DB-\d+$'
---
POST {{base_url}}/orders
HTTP 200
[Captures]
order_id: jsonpath "$.id"wave 4
A retry block runs the step again after a short wait, and each wait is longer than the last one. It obeys the Retry-After header of the server, and it retries only the failures that you list in when.
---
id: create_order
retry:
attempts: 4
backoff_ms: 500
max_backoff_ms: 20000
multiplier: 2
jitter: full
when:
- status: 429
- status: 503
- stderr: 'Connection refused'
---
POST {{base_url}}/orders
HTTP 201wave 5
AI first means that an AI assistant, such as Claude Code, can read and check each part. The tests are plain text. The plan and the results are JSON, and each failure shows the expected value and the actual value. There is no AI inside hurl-orchestra, and there is nothing to configure.
hurl-orchestra --dry-run --json tests{
"ok": true,
"waves": [["auth"], ["create_cart"]],
"nodes": [
{
"id": "create_cart",
"deps": ["auth"],
"variables": ["auth_token"]
}
]
}Each run saves a report of each request. On GitHub, each request shows as a test in the summary of the job, so your team and your AI assistant read the same result.