{"slug": "test-a-web-app-built-with-claude-code-in-5-minutes", "title": "Test a web app built with Claude Code in 5 minutes", "summary": "A developer demonstrated a workflow in which Claude Code uses Kane CLI, a browser-automation testing tool from TestMu AI, to verify running web apps end to end. The CLI installs globally via npm, runs user flows described in plain English in a real browser, and returns pass/fail through exit codes (0 pass, 1 fail, 2 setup error, 3 timeout) plus NDJSON events and saved evidence files. A companion Claude Code skill lets the agent run the checks itself, read results, and fix failures in the same session, with headless runs and exit-code gating intended for CI.", "body_md": "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.\n\nKane CLI 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.\n\nNot 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.\n\n`http://localhost:3000`; change the URL to yours.\nThe 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.\n\n```\nnpm install -g @testmuai/kane-cli\nkane-cli login --oauth   # opens the sign-in page in your browser\nkane-cli whoami          # confirms you are signed in\n```\n\nThere is nothing to wire into your repo or build config.\n\n```\nnpx @testmuai/kane-cli-skill\n```\n\nThis 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](https://www.testmuai.com/docs/kane-cli-skills) cover installing it for one project only.\n\nThe 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:\n\n```\n{\n  \"username\": { \"value\": \"\" },\n  \"password\": { \"value\": \"\", \"secret\": true }\n}\n```\n\nStart your app, then give Claude Code this prompt:\n\n```\nOpen the running web app, sign in, add a task, mark it done, and confirm it\npersists after a refresh. Use kane-cli. The app is at http://localhost:3000.\nSign in with {{username}} and {{password}} from .testmuai/variables/local.json.\n```\n\nOn the first request, Claude Code runs a ready check to confirm Kane CLI is installed and signed in. Then it runs the flow.\n\n[RUN 1: screenshot of the prompt and the ready check in Claude Code]\n\nBy default the browser opens in a visible window, so you can watch. A run takes from 30 seconds to a few minutes.\n\n[RUN 2: screenshot of the browser partway through the flow]\n\nWhen it finishes, Claude Code shows a result card.\n\n[RUN 3: screenshot of the result card]\n\n[RUN 4: paste the command Claude Code ran, then the final run_end line. Remove the account name, project links and local paths. Give the real duration and credits used, e.g. \"Our run took __ seconds and used __ credits.\"]\n\nKane CLI returns one JSON event per line (NDJSON) and an exit code:\n\n| Exit code | Meaning | \n|---|---|\n| 0 | Pass | \n| 1 | Fail | \n| 2 | Setup or auth error; nothing ran | \n| 3 | Timeout or cancelled | \n\nOne 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.\n\nEvery run also saves a `.evidence` file with the step-by-step trace, screenshots, video and logs, so there is proof behind the verdict.\n\nOnce the skill is in place, ask in plain words:\n\n```\nFix the coupon bug and verify it in a browser.\n```\n\nClaude Code makes the change, runs the flow, reads the result and fixes what failed, in one session. Two habits help:\n\nAuthenticate with your TestMu AI credentials, pass `--headless` and `--timeout`, and gate on the exit code:\n\n```\nkane-cli run \"Go to $APP_URL and verify the task list is visible\" \\\n  --agent --headless --timeout 180 \\\n  --username \"$LT_USERNAME\" --access-key \"$LT_ACCESS_KEY\"\n```\n\nKeep the credentials in your CI secret store. A non-zero exit code fails the job.\n\nKane 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.\n\n*Based on our page [Test web apps built with Claude Code](https://www.testmuai.com/claude-code-app-testing/).*", "url": "https://wpnews.pro/news/test-a-web-app-built-with-claude-code-in-5-minutes", "canonical_source": "https://dev.to/testmuai/test-a-web-app-built-with-claude-code-in-5-minutes-2gdm", "published_at": "2026-11-24 08:39:45+00:00", "updated_at": "2026-11-24 08:43:32.738999+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products"], "entities": ["Claude Code", "Kane CLI", "TestMu AI", "Anthropic", "npm"], "also_reported_by": [], "takeaway": "Wiring Kane CLI into Claude Code as a skill lets the agent run plain-English browser flows after each edit and gate on exit codes (0 pass, 1 fail, 2 setup error, 3 timeout), catching broken user flows that a green build and unit tests miss.", "recommendation": {"advice": "After Claude Code edits a web app, have it run a Kane CLI browser flow for the changed user path and gate CI on the exit code, keeping credentials in a gitignored variables file.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/test-a-web-app-built-with-claude-code-in-5-minutes", "markdown": "https://wpnews.pro/news/test-a-web-app-built-with-claude-code-in-5-minutes.md", "text": "https://wpnews.pro/news/test-a-web-app-built-with-claude-code-in-5-minutes.txt", "jsonld": "https://wpnews.pro/news/test-a-web-app-built-with-claude-code-in-5-minutes.jsonld"}}