The problem
A dashboard loads with an empty table and no error. The API returned 200, so every status check is green, but the body came back as an empty array because a filter upstream broke. A 200 is necessary, not sufficient. The contract is the shape of the body, and that is exactly where this class of bug hides.
The idea
The status code is the envelope arriving. This opens the envelope and checks the letter is actually inside.
What you will catch
- An assertion on the body, the item count or a specific field
- A catch for empty or malformed responses behind a rendered page
- A value you can extract and carry into a later step
How it works
Network capture includes response bodies for text content types, up to 64KB per body. The engine parses JSON for you, so you assert on structure in plain English without writing a parser.
Run it now
kane-cli --tui
# then paste this objective:
Go to https://jsonplaceholder.typicode.com/posts.
Assert: the response body contains at least 10 items.Or one line, for CI or sharing
kane-cli run "Go to https://jsonplaceholder.typicode.com/posts.
Assert: the response body contains at least 10 items." --agentWhat prints
Example run. Your numbers will vary by site, build and run. The PASS / FAIL and the zeros are the stable result, the raw timings and counts are illustrative.
▶ navigate /posts ok ▶ assert body >= 10 items parsed 100 items ✓ PASS RESULT PASS exit 0 ~25s ~3 to 6 credits
Adapt it to your app
Go to <your page> and trigger <the request>.
Assert: the "<endpoint>" response returned at least <n> items.
Store the "<field>" from the response as '<name>'.Why it works
Bodies are captured for text content types within the 64KB cap and parsed automatically, so you assert on structure and pull fields out without any code.
What it unlocks
Turn a smoke test into a contract test. Pair the body assertion with an extraction to feed a real server value into the next step of the flow.