COOKIES5 MIN READ

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.

The problem

A properly secured session cookie is HttpOnly, which means JavaScript cannot read it, which means document.cookie returns nothing for it, which means most test tools, built on JavaScript running in the page, are blind to it. So the very cookie that proves a secure login succeeded is the one your existing tests cannot confirm. You end up asserting the user looks logged in, never that the secure session cookie was actually set.

The idea

The most important cookie is the one your scripts cannot see. Kane CLI reads it anyway, so you can finally assert the secure session exists.

What you will catch

  • A secure HttpOnly session cookie a page script cannot read
  • Confirmation that a real session was set, not just that the UI looks logged in
  • The cookie that proves the secure half of authentication worked

How it works

Kane CLI reads cookies below the page, so HttpOnly cookies are fully visible to it even though document.cookie hides them. You assert the cookie exists and carries the HttpOnly flag.

Run it now

kane-cli --tui
# then paste this objective:
Go to https://github.com and let it load.
Assert: at least one HttpOnly cookie is set.

Or one line, for CI or sharing

kane-cli run "Go to https://github.com and let it load.
Assert: at least one HttpOnly cookie is set." --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 HttpOnly cookie set  found 2            ✓ PASS

RESULT  PASS   exit 0   ~45s   ~6 to 10 credits

Adapt it to your app

Go to <your app> and log in.
Assert: a cookie named "<your session cookie>" exists and is HttpOnly.

Why it works

HttpOnly cookies are invisible to document.cookie by design, but Kane CLI reads cookies at the protocol level, so it sees them.

What it unlocks

You can finally assert the secure session itself, not a proxy for it. The login test checks the thing that actually matters, that an HttpOnly session cookie was set.

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.

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.

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