NETWORK5 MIN READ

Check the response, not just the status

Assert the endpoint returned the right shape, an array with items or a field with a value, not merely a 200.

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." --agent

What 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.

More Use Cases

CONSOLE

Catch the bug a screenshot misses

Your visual test is green and the page still loaded broken. This catches the server error and the thrown error the camera cannot see.

PERFORMANCE

X-ray any page

Point Kane CLI at any URL and get back every number your DevTools would show you, in one structured result.

COOKIES

See the cookie your test scripts are blind to

Assert an HttpOnly session cookie exists, the secure cookie that document.cookie and most test tools cannot read.

NETWORK

Catch the API failure behind a green page

Assert the real network result, a 200 where it matters and no 5xx anywhere, even when the page looks perfect.

CONSOLE

Catch the error that only fires on a click

Find the error that a page load check never sees because it only happens when the user acts.

COOKIES

Catch a cookie missing the Secure flag

Fail the moment any cookie is set without the Secure flag, so a session token can never travel over plain HTTP.

NETWORK

Catch an environment leak before it ships

Fail a production build that quietly calls staging, localhost or a debug endpoint.

LOCAL STORAGE

Keep secrets out of local storage

Assert that no obviously sensitive value, a password, a card number, raw personal data, is sitting in storage any script could read.

GENERATE

Describe what to test, get the test cases

Say what you want to test in one sentence and Kane CLI generates the scenarios and the Positive, Negative and Edge cases, no browser, no writing them by hand.

GENERATE

Reuse what you already have with memory

Turn on the memory layer and generation reuses your relevant existing cases and avoids drafting duplicates of coverage you already wrote.

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests