DS DevShelfHub Projects · AI tools
Articles / KaneAI Tutorial: Generate Real Executable Tests From Natural Language and PRDs

AI Engineering

KaneAI Tutorial: Generate Tests From Natural Language and PRDs

By DevShelfHub

How to use KaneAI to author tests in plain English, generate full test suites from a PRD, mix UI and API tests in one case, and rely on self-healing to keep tests stable across UI changes — without replacing your QA team.

KaneAI Tutorial: Generate Tests From Natural Language and PRDs

Introduction

Testing is the work every team knows it should do better and almost no team enjoys. Writing tests is tedious. Maintaining them is worse. Most codebases carry a quiet pile of out-of-date or never-written test cases that everyone politely ignores until something breaks in production.

KaneAI is a generative-AI-native testing agent that takes a different angle: describe the test in plain English (or upload a Jira ticket, PRD, or screenshot), and it produces real executable test code — not pseudo, not snippets — across major languages and frameworks. It handles web and mobile, generates entire test suites from a PRD, and self-heals when the UI shifts. This is a walkthrough of how it works and where it fits into a real QA workflow.

📚 Table of contents

  • What KaneAI actually does
  • Authoring a test in natural language
  • Manual interaction mode for precision steps
  • Generating an entire test suite from a PRD
  • API testing inside the same test case
  • Self-healing tests when the UI drifts
  • Integrations — CI/CD, Jira, GitHub, Slack
  • Best practices
  • Common mistakes
  • Frequently asked questions

🧪 What KaneAI does

KaneAI sits inside LambdaTest’s broader test platform but operates as its own agent. Inputs can be free text, Jira tickets, PRDs, screenshots, audio, or spreadsheets. Outputs are structured test cases plus exportable code (Python + Selenium, Playwright, etc.).

Surfaces it can test

  • Desktop browser sites
  • Mobile apps (native)
  • Mobile browsers
  • HTTP APIs

Output formats

  • Real executable test code
  • Steps you can edit and re-run
  • Network assertions and API checks
  • Version history and run logs

✍️ Authoring a test in natural language

Pick the interface (desktop browser, mobile, etc.), then describe what you want tested. KaneAI spins up a real browser in a sandbox, navigates the page, and generates the test from observed behavior.

Example prompt

“Go to [site URL] and verify the contact form. Confirm the form does not allow submission unless all mandatory fields are filled in. Test both happy-path and missing-field scenarios.”

Watch the agent step through your site live, then accept the generated test or refine with slash commands — add an API check, a visual comparison, an if/else branch, a network log assertion. Save the test and the platform validates and exports the code.

🖱️ Manual interaction mode

Sometimes you don’t want the AI to guess. Manual interaction mode records exactly the clicks, types, and navigations you perform — like a Selenium recorder, but inside the same workflow.

  • Switch into manual mode mid-test
  • Perform the exact interaction you want recorded
  • Switch back to AI mode for the remaining steps
  • Result: a hybrid test that’s deterministic where it matters, AI-driven where it doesn’t

📄 Generating a full test suite from a PRD

The biggest unlock. Upload a product requirements document and KaneAI produces an entire test suite — positive, negative, and edge cases — organized into runnable sets.

  1. Open Generate Scenarios.
  2. Drop a PRD (PDF or markdown).
  3. Click Run. KaneAI parses user stories and form fields, then proposes ~15–20 individual tests grouped into 4–5 suites.
  4. Check the boxes for what you actually want automated.
  5. Provide the test URL, click Create automation.
  6. Tests queue up and run in parallel. Watch live, get the run logs at the end.

🌐 API testing in the same test case

Most testing tools split UI and API tests. KaneAI lets you mix them inside one test, which matches real workflows.

  1. Inside a test, type / and pick Add API.
  2. Configure method, URL, headers, body. Send.
  3. Review the response. Assert status code, headers, or body fields.
  4. Continue with UI steps afterwards.

Example: hit GET /api/submissions without an admin header, assert 401, then continue UI flow as a signed-in user. End-to-end in one test.

🩹 Self-healing tests

The eternal problem with traditional test automation: a button moves, a class name changes, a label gets edited, and your whole suite breaks. KaneAI uses the underlying AI to adapt to minor UI changes automatically. You don’t rewrite tests for every cosmetic redesign.

  • Button position changes — test still passes
  • Label wording tweaks — test still passes
  • CSS class rename — test still passes
  • Semantic regression (button does the wrong thing) — test correctly fails

🔗 Integrations

The platform is only useful if it fits your existing workflow. KaneAI plugs into the standard team surfaces:

  • GitHub / GitLab for CI/CD
  • Jira, Azure DevOps, BugHerd, Shipboard for bug tracking
  • Slack, Teams for notifications
  • Webhooks for custom triggers

✅ Best practices

  • Start small: one core happy-path test before generating from a PRD
  • Mix AI mode and manual mode — AI for setup, manual for the critical click
  • Always review AI-generated test suites — some scenarios will be redundant or off-target
  • Use API assertions to verify backend state, not just UI feedback
  • Hook tests into CI so they run on every PR, not just before releases
  • Tag tests by feature area so suite runs stay focused
  • Treat self-healing as a safety net, not a substitute for occasional manual review

❌ Common mistakes

  • Generating 50 tests from a PRD and never reviewing what they actually cover
  • Treating KaneAI as a QA team replacement instead of an accelerator
  • Skipping manual mode for steps where determinism matters (payments, auth)
  • Not wiring tests into CI — they only catch regressions if they run
  • Trusting self-healing on semantic regressions — verify visually after big UI changes
  • Ignoring API assertions and only testing UI — misses backend bugs

Conclusion

KaneAI is the rare testing tool that actually shortens the loop. PRD-to-suite in minutes, hybrid natural-language and manual recording, real exportable code, self-healing across UI tweaks. It doesn’t replace your QA engineers — it removes the tedious authoring tax so they spend time on the hard cases.

Drop in a PRD, generate the suite, prune what you don’t need, and wire it into CI. If your team has been quietly carrying test-case debt, this is the cheapest way to start paying it down.

Explore More on DevShelf

KaneAI Tutorial: Generate Real Executable Tests From Natural Language and PRDs FAQ

Is KaneAI free to try?

Yes — free trial available. Paid plans kick in for higher run volumes and team features.

What languages does it export tests in?

Python + Selenium is the default; Playwright, Java, and other major test frameworks are supported.

Does it work for mobile apps?

Yes — native mobile (iOS/Android) and mobile browsers are first-class. Upload an app or point it at a URL.

Will it replace my QA team?

No, and it’s not designed to. Treat it as test-authoring leverage. Your QA team still owns strategy, edge cases, exploratory testing, and accepting AI-generated suites.

How accurate are the generated tests?

Good enough that the review step is meaningful work. Expect to prune 10–30% as redundant or off-target. The rest is usable as-is or with minor edits.

Can it test authenticated flows?

Yes — either provide credentials in the test or use manual mode to record the login once and replay it. Store secrets in the platform’s vault, not in plain text.

How does it handle flaky tests?

Self-healing addresses some flakiness automatically. For others, configure retries and explicit waits in the test config. Persistent flakes still need root-cause work.