Claude Code edits real code and it compiles, but a green build is not a working web app. An edit drifts a type, touches a file you didn't ask about, or leaves a form that no longer submits, and the build stays green. The diff shows what moved, not whether the flow still works.
Kane CLI, which we build at TestMu AI (formerly LambdaTest), drives your running web app in a real browser, checks each step of a flow you describe in plain English, and returns a pass or fail. In this tutorial, Claude Code runs that check itself.
Do you need a special testing CLI for Claude Code?
Not for unit tests: Claude Code already runs pytest, vitest or jest on its own. Kane CLI covers the layer those runners cannot reach: it opens the app in a real browser and reports whether the user flow works.
What you need
- Node 18 or later, and Chrome installed
- Claude Code
- A TestMu AI account
- A web app running locally. The example is a task app on
http://localhost:3000; change the URL to yours.
The CLI is free to install. Runs use KaneAI credits. As of November 2026, you can start free with 10,000 credits, valid for 30 days.
Step 1: Install Kane CLI
npm install -g @testmuai/kane-cli
kane-cli login --oauth # opens the sign-in page in your browser
kane-cli whoami # confirms you are signed in
There is nothing to wire into your repo or build config.
Step 2: Add the Claude Code skill
npx @testmuai/kane-cli-skill
This installs the skill to ~/.claude/skills/kane-cli/. The skill teaches Claude Code when to call Kane CLI and how to read the result. If Claude Code is already running, restart it so it loads the skill. The skill docs cover installing it for one project only.
Step 3: Describe the flow and verify
The flow signs in, so put a test account's credentials in a variables file instead of the chat. Create .testmuai/variables/local.json, fill in the values yourself, and keep the file out of git:
{
"username": { "value": "" },
"password": { "value": "", "secret": true }
}
Start your app, then give Claude Code this prompt:
Open the running web app, sign in, add a task, mark it done, and confirm it
persists after a refresh. Use kane-cli. The app is at http://localhost:3000.
Sign in with {{username}} and {{password}} from .testmuai/variables/local.json.
On the first request, Claude Code runs a ready check: who is signed in, how many credits are left, whether Chrome was found, and whether your app is already running. Then it runs the flow.
By default the browser opens in a visible window, so you can watch. A run takes from 30 seconds to a few minutes.
When it finishes, Claude Code shows a result card with pass or fail, what happened, the credits used, and links to the evidence pack and the test case.
How Claude Code knows whether it passed
Kane CLI returns one JSON event per line (NDJSON) and an exit code:
| Exit code | Meaning |
|---|---|
| 0 | Pass |
| 1 | Fail |
| 2 | Setup or auth error; nothing ran |
| 3 | Timeout or cancelled |
One thing to know about code 1: it also covers a start URL that doesn't load. If the app isn't running, you get a 1, not a 2, and the run still uses credits. Check that the URL opens before you start.
Every run also saves a .evidence file with the step-by-step trace, screenshots, video and logs, so there is proof behind the verdict.
Make it part of the edit loop
Once the skill is in place, ask in plain words:
Fix the coupon bug and verify it in a browser.
Claude Code makes the change, runs the flow, reads the result and fixes what failed, in one session. Two habits help:
- End with the outcome. "Confirm the task is still marked done after a refresh" is a check. "Click Save" is not.
- Never weaken the check to get a pass. If the app is wrong, fix the app.
Run the same kind of check in CI
Authenticate with your TestMu AI credentials, pass --headless and --timeout, and gate on the exit code:
kane-cli run "Go to $APP_URL and verify the task list is visible" \
--agent --headless --timeout 180 \
--username "$LT_USERNAME" --access-key "$LT_ACCESS_KEY"
Keep the credentials in your CI secret store. A non-zero exit code fails the job.
What this checks, and what it doesn't
Kane CLI checks the flow you describe, in a real browser: sign-in, forms, data that has to survive a refresh. It does not replace unit tests, and it won't check a flow nobody described. Start with the one or two journeys that would hurt most if they broke.
Based on our page Test web apps built with Claude Code.
Top comments (0)