Run End-to-End Tests from Your Terminal with Kane CLI
Author and Run Tests Right from the Terminal in Natural Language, with an Evidence-Backed Pass or Fail from a Real Browser.
npm install -g @testmuai/kane-cli
How to Test and Review AI-Generated Code Before You Merge
How to test and review AI-generated code before merge: spec-first tests, property and mutation checks, package scans and real-browser E2E runs
In a TestMu AI experiment, the AI-written tests passed on the buggy code in 22 of the 60 suites when it had the code to work from and 0 of the 60 when it had only the spec. To test AI-generated code, you write the acceptance criteria first, derive the tests from that, do the lint, the scans and the mutation checks and then test the user journey in the browser.
Key facts
- The suites that carried the bug still averaged 97.3% for their Stryker mutation score.
- 96% of 1,100+ developers don't fully trust AI code (Sonar, January 2026).
- Only 48% consistently verify AI-generated code before committing (Sonar, January 2026).
- AI code came in at 56% on the security pass rate (Veracode, July 2026).
TestMu AI has Kane CLI, which is the end-to-end testing agent that you run from the terminal or from within Claude Code, Cursor and Codex. The workflow described below is agnostic to your toolchain, and Kane CLI is where it fits.
TL;DR
Testing AI-generated code means checking each change against acceptance criteria that a person wrote before the prompt, with an oracle the coding model never controls. Tests take their expected values from those criteria, a real-browser run on the preview URL confirms what users see, and a human reviews the diff against the same criteria before merge.
How Do You Test AI-Generated Code?
- Acceptance criteria first: A person writes 2-5 sentences of observable outcomes, including one negative case, before the coding agent starts. The agent gets the criteria as input but cannot edit the copy that later tests and reviews trace back to.
- Spec-first tests: Spec-first tests take expected values from the criteria, never from the code under test. In TestMu AI's 60-suite study, code-first AI tests passed on buggy code in 22 suites and spec-first tests in none.
- Property-based testing: fast-check (JavaScript and TypeScript) and Hypothesis (Python) check one rule, such as "a discount never goes below zero", across 100 generated inputs per property by default.
- Mutation testing: Stryker (JavaScript and TypeScript) and mutmut (Python) change the code on purpose to find assertions that check nothing. A high mutation score grades the tests, not whether the code matches the intent.
- Real-browser verification: An end-to-end journey on the preview URL asserts the text and state a user sees. Kane CLI by TestMu AI runs that check from a plain English objective in real Chrome and returns exit code 0 or 1 with step evidence.
Reviewing AI-Generated Code and Vibe-Coded Apps
- Reviewing AI-generated code: A reviewer reads the criteria, then the file list and new dependencies, then the diff, looking for edited or skipped tests, silent error handling and scope creep. Payments, auth and deletion logic also need a named human approver.
- Testing AI-written code in CI: A CI gate for AI-written code makes the browser journey a required status check on each pull request's preview deployment and replays saved tests from cache, so verification keeps pace with generation.
- Vibe coding testing: Founders who can't read the code list five things a customer must be able to do and one thing that must never happen, then try each on a phone and a laptop, signed in and signed out.
What Does Testing AI-Generated Code Mean?
Testing of AI-generated code checks the change against the acceptance criteria that a human wrote prior to the model even starting. The acceptance criteria define what the users must be able to do and what must never happen. Every test, every scan and every review in this guide can be traced back to those criteria.
AI-generated code requires that anchor because a coding agent has only its own reading of the prompt. If that reading is wrong, then the agent will generate wrong code and will then generate tests that will agree with that wrong code.
A human author's tests will usually embody the author's intent. An agent's tests will embody the agent's interpretation.
The independent oracle is the fundamental concept here. An oracle is whatever has the authority to decide pass or fail.
For AI-generated code, the oracle has to be something external to the model that produced the change. It could be a written requirement, a property that must always be true, the person who owns the feature, or a user journey that you run against the rendered app.
Why Does AI-Generated Code Need an Independent Oracle?
AI-written tests inherit the same misreading as the AI-written code. Saurabh Prakash at TestMu AI measured this with two models, Gemini 3.1 Pro Preview and Gemini 3.8 Flash. Each model got six small JavaScript functions with one seeded bug apiece (boundary, off-by-one, parsing, missing rule) and wrote Jest unit tests, five runs per function per model (read the full 60-suite study).
| Setup | Suites that passed on the buggy code | Bug catch rate |
|---|---|---|
| Code-first (model sees the buggy file) | 22 of 60 (37%) | 27 of 60 (45%) |
| Spec-first (model sees only the docstring and signature) | 0 of 60 | 55 of 60 (92%) |
Every suite that went green on the bug also failed on the correct version of the function. The tests had recorded the bug as expected behavior. When the model was subsequently asked to make the failing tests pass, it only changed the implementation in 59 of 60 runs and never touched the test file.
Outside research is in agreement. An October 2026 arXiv paper on coding agents makes the point that the test an agent writes for its own patch "accepts many incorrect ones" (Mohsin et al., arXiv:2610.03984).
66% of developers in the Stack Overflow 2025 Developer Survey cited "almost right, but not quite" AI as their biggest pain point.
Write the acceptance criteria prior to any code existing and keep the agent well clear of them.
Try it on your own branch
Note: Kane CLI takes a plain English requirement and checks it against your running app in a real browser. It returns an exit code of 0 (pass) or 1 (fail) with step-by-step evidence. npm install -g @testmuai/kane-cli · Get 10,000 free Kane CLI credits
Review vs Testing vs Detection: What Each One Catches
Code review, testing and AI detection all answer three very different questions.
Review is all about whether it looks right. Testing is about whether it behaves correctly when you actually run it. Detection is about whether a model probably has written it.
| Code review | Testing | AI detection | |
|---|---|---|---|
| Question answered | Does the diff look correct and fit the codebase? | Does the running code meet the requirement? | Was this probably written by a model? |
| Method | Reading the diff without executing it | Executing lint, unit, property, mutation and end-to-end checks | Statistical classifier over the text |
| Catches well | Wrong approach, naming, architecture drift, unreadable code, missing tests | Wrong outputs, boundary bugs, broken flows, rendering failures, regressions | Nothing about correctness |
| Misses | Runtime, integration and environment failures; code that reads clean and is wrong | Requirements nobody wrote down; style and maintainability | Bugs, security flaws, intent drift |
| Evidence produced | A reviewer's opinion | A reproducible pass/fail result | A probability score |
| When to use | Every AI-assisted PR | Every AI-assisted PR, scaled by risk | Academic-integrity or policy checks only |
For AI-generated code, you need both review and testing, and a test run will tell you what a review can only give you an estimate of. Detection has no place in a quality gate.
How to Test AI-Generated Code: An 8-Step Workflow
The eight steps below are how you test, verify and validate AI-generated code (in that order: before the prompt, as you write the tests, in CI and at review). Steps 1-5 prevent every merge.
Step 6 is a gate on a drop in mutation score. Step 7 blocks any change that a user can see. Step 8 scales with risk.
Step 1: Write the Acceptance Criteria Before You Prompt
Acceptance criteria written prior to generation are the first independent oracle. In the ticket or PR description, write 2-5 sentences that state the observable outcomes (including at least one negative case).
Feature: promo codes at checkout
- A signed-out visitor can apply SAVE10 and the order total will be reduced by 10%.
- An expired code will simply show 'This code has expired' and the total will remain the same.
- Applying a code doesn't require the visitor to log in.
- All totals are rounded to the nearest cent and will never go below $0.00.Give the coding agent those criteria as input. Keep a copy of it that the agent cannot edit, as Steps 2 and 7 will be testing against that.
Step 2: Write Spec-First Tests That Take Expected Values From the Requirement
Spec-first tests take their expected values from the acceptance criteria. The circular test below can't fail, as the code under test generates its own expected value.
// Circular: the expected value comes from the code under test
expect(applyDiscount(100, 20)).toBe(applyDiscount(100, 20));
// Independent: the expected value comes from the requirement (20% off 100 = 80)
expect(applyDiscount(100, 20)).toBe(80);An AI model can still generate the test if it only sees the acceptance criteria, the function signature and the docstring. You'd write the implementation in a separate session. In the TestMu AI study, that one change took the bug catch rate from 45% to 92%.
Step 3: Add Property-Based Tests for the Edge Cases Nobody Listed
Property-based testing checks a rule across hundreds of generated inputs. AI-written code is very likely to only deal with the happy path and will miss the empty, boundary and extreme values, so properties make a very good second oracle. fast-check (JavaScript/TypeScript) and Hypothesis (Python) will run 100 generated cases per property by default.
// fast-check + Jest
const fc = require('fast-check');
const { applyDiscount } = require('./pricing');
test('a discount never goes below zero or above the original price', () => {
fc.assert(
fc.property(
fc.integer({ min: 0, max: 1_000_000 }), // price in cents
fc.integer({ min: 0, max: 100 }), // percent off
(cents, pct) => {
const out = applyDiscount(cents, pct);
return out >= 0 && out <= cents;
}
)
);
});# Hypothesis + pytest
from hypothesis import given, strategies as st
from pricing import apply_discount
@given(st.integers(min_value=0, max_value=1_000_000), st.integers(min_value=0, max_value=100))
def test_discount_bounds(cents, pct):
out = apply_discount(cents, pct)
assert 0 <= out <= centsWhen a property fails, both libraries will shrink the input down to the smallest failing case, which keeps the bug report short enough to simply paste back into the agent.
Step 4: Run Lint, Type Checks and the Full Regression Suite
Lint, type checks and the full regression suite will catch any AI changes that break code the model has never seen. A coding agent only sees the files in its context window, so a renamed field or a changed return type can easily break callers elsewhere in the codebase. Run the full suite on every AI-assisted PR, including any tests that aren't directly related to the change.
# JavaScript / TypeScript
npm run lint && npx tsc --noEmit && npm test -- --runInBand
# Python
ruff check . && mypy . && pytestTreat a type error in a file that the PR didn't touch as a signal that the agent has changed a shared contract.
Step 5: Check New Dependencies and Licenses, and Scan for Vulnerabilities and Secrets
Dependency, license, vulnerability and secret checks all block the merge on any finding. Coding agents will occasionally import packages that don't exist, and an attacker can then register those names (slopsquatting and package hallucination).
In Spracklen et al. (USENIX Security 2025), they found on average that 5.2% of the packages suggested by commercial models and 21.7% of the packages suggested by open source models didn't exist. The study looked at 576k generated samples from 16 models and found 205,474 unique invented package names.
# 1. List dependencies added on this branch
git diff origin/main...HEAD -- package.json requirements.txt
# 2. Confirm each one exists, who publishes it, and when it first appeared
npm view <package> name repository.url time.created
pip index versions <package>
# 3. License summary for the dependency tree
npx license-checker-rseidelsohn --summary # JavaScript
pip-licenses # Python: run inside the project's virtualenv
# 4. Known vulnerabilities in the lockfile
osv-scanner scan -L package-lock.json
# 5. Static analysis (exits 1 on findings)
semgrep scan --config auto --error
# 6. Hard-coded secrets in the branch history
gitleaks git -vTreat any package that returns a 404, has no repository or was first published days ago as suspect until a human has approved it. semgrep --config auto will fetch the rules from the Semgrep Registry and send Semgrep the URL of your repository (for private code you'd pin a ruleset such as --config p/default or use a local rules file with --metrics=off). If an agent reproduces a long block of code, then check that it actually matches public code that you wouldn't be able to accept under your project's license.
Tool documentation: OSV-Scanner, Semgrep, Gitleaks. For the full threat model, see our guide to securing AI-generated code.
Step 6: Grade the Tests With Mutation Testing, and Know Its Limits
Mutation testing changes the code on purpose (flips < to <=, deletes a line) and checks whether any test fails. Surviving mutants expose assertions that check nothing. Use Stryker for JavaScript/TypeScript or mutmut for Python, and run it on changed files so CI time stays bounded.
# JavaScript / TypeScript
npm init stryker@latest # one-time config
npx stryker run # prints mutation score and surviving mutants
# Python (on Windows, run mutmut inside WSL)
pip install mutmut
mutmut run
mutmut results
mutmut browse # interactive view of surviving mutantsMutation testing has one blind spot which is important in the context of AI code. Mutation scores tell you whether your tests will detect changes to the code as written and therefore can't tell you that the code was wrong to begin with.
In the TestMu AI study, the bug encoding suites had an average Stryker mutation score of 97.3%. Use mutation testing to find your empty and circular tests and rely on Steps 1, 2 and 7 to catch wrong intent. Gate on a drop in score for changed files rather than a fixed threshold.
Step 7: Run the Real User Journey on the Preview URL and Assert What the User Sees
End-to-end tests against the rendered app are the oracle closest to the user. Unit tests will pass on code that never makes it to the screen, code that renders off the viewport and code that breaks on mobile. In a TestMu AI viewport sweep of AI-written components, we found 10 components that rendered at 6 viewports; all passed every desktop check, and all 10 failed on mobile.
Assert visible text and state. In Playwright, toBeVisible() will pass if any toast is present (including an error toast). toHaveText() is the one that enforces the requirement.
import { test, expect } from '@playwright/test';
test('signed-out visitor applies SAVE10', async ({ page }) => {
await page.goto('/cart');
await page.getByLabel('Promo code').fill('SAVE10');
await page.getByRole('button', { name: 'Apply' }).click();
// Weak: passes for "Code applied" and for "Something went wrong"
await expect(page.getByRole('status')).toBeVisible();
// Strong: the acceptance criteria, as the user sees them
await expect(page.getByTestId('order-total')).toHaveText('$90.00');
await expect(page).not.toHaveURL(/\/login/);
});Kane CLI runs the exact same check as per the acceptance criterion in plain English. Kane CLI uses a real Chrome browser, and there's a separate verification stage which determines the verdict. A pass requires that all of the acceptance criteria are met.
kane-cli login --oauth # once, in your own terminal
kane-cli run "As a signed-out visitor, apply promo code SAVE10, \
then assert the order total shows \$90.00 and no login prompt appears" \
--url http://localhost:3000/cart --agent --headless --timeout 300
echo $? # 0 passed · 1 failed · 2 auth/setup error · 3 timeout or cancelled
Make the journey a required status check on every pull request's preview deployment. The GitHub Actions workflow below will run upon a successful preview deployment and pass the preview URL to the Kane CLI. Add the job name to your branch protection rule as a required status check so that a failed journey will block the merge.
# .github/workflows/verify-preview.yml
name: verify-preview
on: deployment_status
jobs:
user-journey:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- run: npm install -g @testmuai/kane-cli
- run: kane-cli login --username "$TESTMU_USERNAME" --access-key "$TESTMU_ACCESS_KEY"
env:
TESTMU_USERNAME: ${{ secrets.TESTMU_USERNAME }}
TESTMU_ACCESS_KEY: ${{ secrets.TESTMU_ACCESS_KEY }}
- run: |
kane-cli run "As a signed-out visitor, apply promo code SAVE10 at checkout, \
then assert the order total shows \$90.00 and no login prompt appears" \
--url "${{ github.event.deployment_status.environment_url }}" \
--agent --headless --timeout 600The secret names are just examples (use the names that your repository actually uses to store the TestMu AI credentials). To maintain the credibility of the gate over time, you'll want to set up a continuous verification gate with evidence and ownership rules.
Step 8: Review the Diff Against the Requirement, Scaled by Blast Radius
Human review is the ultimate oracle and the most expensive one. We'd recommend four levels of trust for AI-generated changes:
| Change type | When to accept |
|---|---|
| Boilerplate, data conversions, test scaffolding, framework glue | Accept after Steps 1-5 pass and the Step 6 mutation score holds |
| User-facing flows, form validation, routing | Accept after Steps 1-6 and the Step 7 journey pass |
| Authorization, payments, migrations, deletion logic | Needs Steps 1-7 plus a named human approver |
| Any change the submitter cannot explain | Do not accept |
When two levels of checking appear to be applicable, go with the stricter one for the code that has the larger blast radius. A second AI model from a different provider can be used to pre-review the diff and detect any hallucinated APIs or deprecated calls before a human even has a chance to look.
Use a second model as a reviewer, not as the oracle. Its comments are just leads to look at, and the acceptance criteria still determine whether you pass or fail. Every bug that slips through becomes a new spec-first test so the oracle grows with every incident.
How to Test Code Written by Claude Code, Cursor or Codex
Claude Code, Cursor and Codex all need one further rule: the session that is editing the code must not be the one that edits the tests. Write your spec first tests in one session and the implementation in another. Put the test directories under a CODEOWNERS rule so that a person has to approve any change to the tests.
Install the Kane CLI skill (npx @testmuai/kane-cli-skill) for Claude Code or Codex, or append the Kane CLI instructions to AGENTS.md for Cursor. Give the agent a clear stop condition: the job is complete when kane-cli run exits 0. To pick an assistant to do the test work, compare the various AI code assistants for testing.
How to Review AI-Generated Code in a Pull Request
Review the AI-generated code by reading the diff against the acceptance criteria from Step 1. Read the acceptance criteria first, then the file list and the new dependencies and only then the functions.
Reviewers of AI-generated PRs should look for five signals that human-written PRs rarely show:
- Edited/Deleted tests. Agents will sometimes go and make a red build green by either editing or deleting the test. GitHub's Copilot docs list deleted/skipped tests rather than fixed tests as an AI-specific gotcha.
- Comments that describe behavior. A comment such as
// handles expired codesmust have a corresponding line of code or a test to prove it. Delete or fix any comments that have neither. - Silent error handling.
catchblocks that log and return turn loud failures into quiet ones. - Scope creep. Be on the lookout for files that weren't in the original requirement at all (e.g., config, auth middleware, lockfiles).
- Duplicated logic. A second copy of an existing helper means the next fix goes in one and misses the other.
Copyable Checklist for PRs With AI-Generated Changes
## AI-generated change checklist
- [ ] Acceptance criteria written before generation are linked in this PR
- [ ] Expected values in new tests come from the criteria
- [ ] No existing test was deleted, skipped or loosened (diff of *.test.*, *.spec.*, test_*.py checked)
- [ ] Code and tests were written in separate agent sessions
- [ ] Property-based test added for any function with numeric, date, string-parsing or list input
- [ ] Lint, type check and the full regression suite pass
- [ ] Every new dependency exists, has a repository, has an acceptable license and has been approved by a person
- [ ] semgrep, osv-scanner and gitleaks pass in CI
- [ ] Mutation score on changed files did not drop (Stryker / mutmut)
- [ ] The user journey was on the preview URL and asserted visible text or state (exit code 0)
- [ ] Mobile viewport checked for any UI change
- [ ] Auth, payment, migration, or delete logic has a named human approver
- [ ] The author can explain every changed line without asking the AIAI Failure Patterns and the Check That Catches Each
AI-generated code fails in very recognizable patterns, and there's a very cheap check for each of those patterns. Map your gates to that table rather than adding every tool to every PR.
| Failure pattern | Example | Check that catches it | Steps |
|---|---|---|---|
| Intent drift | Discount applied after tax instead of before | Acceptance criteria + spec-first tests; human review against the requirement | 1, 2, 8 |
| Circular tests | expect(f(x)).toBe(f(x)), or expected values copied from output | Spec-first tests; mutation testing for empty assertions | 2, 6 |
| Happy-path bias | Crashes on empty input, zero, negative values or Unicode | Property-based tests | 3 |
| Off-by-one and boundary errors | < instead of <= on a password-length rule | Spec-first boundary cases; property tests | 2, 3 |
| Context blindness | Renamed field breaks a caller the agent never opened | Type check + full regression suite | 4 |
| Hallucinated packages or APIs | Import of a package that does not exist on npm or PyPI | Registry check before install; lockfile review | 5 |
| License or public-code match | Long block copied from a GPL project into a proprietary repo | License summary; public-code matching | 5 |
| Known-vulnerable patterns | Unescaped output leading to XSS (15% pass rate in Veracode's July 2026 benchmark) | SAST (Semgrep), dependency scan (OSV-Scanner) | 5 |
| Leaked secrets | API key pasted into a config file | Secret scanning (Gitleaks) | 5 |
| Stale training data | Deprecated browser API, Chrome-only CSS | Real-browser and real-device runs | 7 |
| Renders wrong, tests green | Component passes unit tests and overflows on mobile | E2E assertions on visible text across viewports | 7 |
| Race conditions and session expiry | Double-click places two orders; expired session silently drops the cart | E2E journeys with two concurrent sessions and an expired token | 7 |
| HTTP 200 with an error body | API returns 200 and {"error": "..."}, and the UI shows success | Assertions on response body and visible state | 7 |
| Unhandled error paths | catch (e) { console.log(e) } hides a failed payment | Fault injection; lint rule for empty catch blocks | 4, 8 |
| Weakened or skipped tests | test.skip added to make CI pass | Review of test-file diffs; CODEOWNERS on tests | 8 |
| Self-approved review | The same model reviews and approves its own diff | Second-model pre-review plus a human approver | 8 |
| Duplication debt | Same validation logic pasted into three handlers | Clone detection; review | 8 |
How to Verify AI-Generated Code With Kane CLI
Kane CLI is TestMu AI's end-to-end testing agent for developers. It takes plain English objectives and runs them against web apps in real Chrome, as well as against Android emulators, iOS simulators and real devices. It works inside Claude Code, Cursor, Codex, Gemini CLI and any CI pipeline.
Kane CLI fits the independent-oracle workflow in four ways:
- The verdict is separate from the actor. Kane CLI does its planning and action on the app; a separate verification phase then determines the outcome, and a pass only occurs if all the acceptance criteria are met. A failed result is reported as a bug and is never 'healed' into a pass.
- Evidence for every step. Each run produces an
.evidencepack with per-step screenshots, console logs and network logs so a reviewer can see what was actually checked. - Saved tests replay the exact same recorded steps. A
_test.mdfile will cache each passing step and then go on to replay the recordings from cache with no LLM cost at all. A step is only re-authored when its target changes and that change is recorded. - Typed exit codes for CI and agents. 0 = passed, 1 = failed, 2 = auth or setup error, 3 = timeout or canceled. The
--agentflag outputs NDJSON, which a coding agent can consume.
# Install the CLI and the agent skill (Claude Code, Codex CLI, Gemini CLI)
npm install -g @testmuai/kane-cli
npx @testmuai/kane-cli-skill
# Authenticate in your own terminal; never paste keys into the agent chat
kane-cli login --oauth
kane-cli whoami
# Replay a saved test (cached steps, no LLM cost)
kane-cli testmd run tests/checkout_test.md --agent
# Run every smoke-tagged test as one suite in CI
kane-cli testrun run --tags smoke --agent --headlessThe Kane CLI coding agent docs cover Cursor's AGENTS.md setup and the NDJSON event format. QA teams who are writing tests in natural language from Jira tickets and PRDs can use KaneAI (the end-to-end testing agent) on the same platform.
How to Test Vibe-Coded Apps If You Are Not an Engineer
Vibe-coded apps need the same independent oracle (in plain English). If you've built an app with Lovable, Bolt, Replit or Cursor and can't read the code, you can still test what it does.
- Five things a customer must be able to do: sign up, log in, pay, see their own data and delete their account. One thing which must never happen: they must never be able to see another user's data.
- Try them all yourself on a phone and on a laptop, signed in and signed out. In a TestMu AI probe of six live vibe-coded apps, we found five logged an error on first load and two lost their in-progress work on reload (vibe coding risks study).
- Check that the data is locked down. CVE-2025-48757 (CVSS 9.3) allowed unauthenticated attackers to read or write database tables in sites generated by Lovable up to 15th April 2025 due to a weak row-level security policy (GitHub Advisory).
- Turn your 5 sentences into automated checks that run prior to every publish. Kane CLI will take those sentences as they are; see vibe testing in plain English for a worked example.
- Get a developer to review anything that touches money, logins or deletion prior to real users coming through.
Teams moving a vibe-coded prototype into a real codebase can follow our vibe coding QA process with merge gates.
Can You Spot AI-Generated Code, and Does That Actually Matter for Testing?
AI code detectors will give you a probability that a model wrote a snippet. A detector score tells you nothing about whether a discount will round correctly or whether a login page will leak data.
They're of academic and policy interest only. A team that ships AI-assisted code can just label it in the PR if that's what their policy is, and then of course they'd test the code with the same workflow.
What to Measure Once the Workflow Is Running
Four numbers show whether testing of code generated by AI is working:
- Escaped defects per release on AI-assisted changes vs. human-only changes.
- Share of AI-assisted PRs with linked acceptance criteria written prior to generation.
- Mutation score on the changed files, watched as a trend.
- Time from PR open to verified pass, so verification keeps pace with generation.
Raw coverage is a terrible headline metric for AI-assisted code. AI-written tests can easily inflate coverage, and coverage just counts lines that have been executed; it doesn't in any way check that a requirement has been met.
Start Testing AI-Generated Code on Your Next PR
Pick one AI-assisted PR this week, write out its acceptance criteria, run those against the running app and compare the outcome with the agent's own test report.
npm install -g @testmuai/kane-cli
kane-cli login --oauth
kane-cli run "<your acceptance criteria in plain English>" --agent --headlessRelated reading: Why trust in AI-generated code breaks
Conclusion
Begin with the riskiest AI-assisted change in your current sprint and run it through Steps 1, 2 and 7 first: written criteria, spec-first tests and a journey on the preview URL. Add the scans, the mutation checks and the review tiers once those three gate every merge.
Testing from the terminal? Kane CLI by TestMu AI lets SDETs and developers plan, write, run and debug tests from the command line.
Sources Cited on This Page
- TestMu AI, "Why AI-Generated Tests Pass When Your App Is Broken," October 23, 2026
- TestMu AI, "How to Verify AI-Written UI Changes Across Viewports," August 31, 2026
- TestMu AI, "9 Vibe Coding Risks and How to Test for Them," August 31, 2026
- Sonar press release, January 8, 2026
- Veracode, "2026 GenAI Code Security Report," July 28, 2026
- Spracklen et al., USENIX Security 2025
- Mohsin et al., "Teaching Agents to Code Reliably," arXiv:2610.03984, October 2, 2026
- Stack Overflow 2025 Developer Survey, AI section
- GitHub Docs, "Review AI-generated code"
- GitHub Advisory GHSA-773x-pxjg-gxgx (CVE-2025-48757), May 30, 2025
Was this helpful?
Authors

Saurabh Prakash
Author · 30 posts
Saurabh Prakash is an Engineering Manager at TestMu AI, where he leads engineering on agentic AI development and scalable system architecture for the quality engineering platform. He has also contributed to Test at Scale, the company's open-source test intelligence platform. He brings over 9 years of experience across Node.js, Java, Spring, MVC, data structures, algorithms, and scalable system design, with earlier roles as SDE 2 at Zomato, Senior Software Engineer at LogicHub, and Software Development Engineer at Directi. Saurabh holds a B.Tech in Computer Science and Engineering from Delhi Technological University.

Anmol Gupta
Reviewer
Anmol Gupta is Vice President of Product Management at TestMu AI, driving HyperExecute, the test orchestration cloud that runs and accelerates automated test execution. He led the development of the Unified Test Execution Cloud Platform and now leads a 30-member cross-functional product organization across product lines contributing $7M+ in revenue. He brings over nine years of experience and previously co-founded the SaaS company Timble as CTO, where he grew the team from 5 to 40 and launched an AI KYC platform that processed 600K+ applications in five months while cutting verification time from 12 minutes to under 30 seconds. Anmol holds an MTech and BTech from IIT Delhi.
Testing AI-Generated Code FAQs
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


