NETWORK5 MIN READ

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.

The problem

A team's analytics dashboard renders its charts and KPIs, so everyone trusts the numbers on screen. Underneath, the metrics API returned a 500 and the UI quietly fell back to cached values, so the exec is reading last week's revenue presented as today's. The page looks complete and current. The data is stale and wrong, and a visual test is structurally blind to it: the pixels are fine, the network is not.

The idea

A screenshot photographs the paint. This reads the wiring behind the wall, the requests the page actually made and what the server actually said.

What you will catch

  • A 200 on the endpoint that matters, the metrics, the search, the save
  • Zero 5xx anywhere in the page traffic, including calls the UI swallowed
  • A clean pass or fail you can block a merge on

How it works

Kane CLI records every request the page makes in the background, in an isolated sandbox, without ever opening the DevTools panel. Your sentences assert against that recording. Network capture resets each step, so the assertion sits in the same step as the action that triggers the traffic.

Run it now

kane-cli --tui
# then paste this objective:
Go to https://developer.mozilla.org and let the page load.
Assert: no network request returned a 5xx status.
Assert: the main page request returned 200.

Or one line, for CI or sharing

kane-cli run "Go to https://developer.mozilla.org and let the page load.
Assert: no network request returned a 5xx status.
Assert: the main page request returned 200." --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 + settle                            ok
▶ assert no 5xx           0 of 80 requests     ✓ PASS
▶ assert main request 200 seen 200             ✓ PASS

RESULT  PASS   exit 0   ~1m   ~10 to 20 credits

Adapt it to your app

Go to <your dashboard> and load the data.
Assert: the request to "<your metrics endpoint>" returned 200.
Assert: no network request returned a 5xx status.

Why it works

The assertion runs against captured traffic, not the DOM, so it sees failures the render hides. The 5xx check scans every request in the step, including background calls.

What it unlocks

Put it beside your visual test. The visual test guards the pixels, this guards the plumbing. Together they catch what either one misses alone.

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

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.

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