Author End-to-End Tests in Natural Language with KaneAI

Plan, Author, and Evolve E2E Tests for Web and Mobile Apps in Natural Language.

AI TestingAutomation

Natural Language Test Automation: Tools and How It Works

Natural language test automation turns plain English into tests. See how a step runs, where it fails, how it differs from Gherkin, and which tools do it.

Last Updated on:

Natural language test automation lets you write a test as a plain English sentence and have a language model resolve that sentence into executable steps against the live application. The 2025 Stack Overflow Developer Survey reports that 66% of developers name "almost right, but not quite" AI output as their biggest frustration, and that is the failure mode a generated test has to survive.[1]

This guide covers how a sentence becomes an executed test, the three architectures that interpret it and the tools that use each, production reliability, verifying a generated test, the Gherkin precedent, selector hygiene, and where plain English tests belong.

Key Takeaways

Natural language test automation is automated testing where each test step is written in plain English and software turns it into actions and checks against the application. Tools take one of three approaches: they map each step to code a developer writes, generate test code from a description, or resolve each step against the live app at run time.

Which Tools Let You Write Automated Tests in Plain English?

  • Cucumber (BDD): Cucumber runs Given, When and Then steps from a .feature file, and every step needs a matching step definition that a developer writes and maintains. Open source: yes. Step code to write: yes.
  • Robot Framework (keyword-driven): Robot Framework runs keyword lines from a .robot file, and each keyword comes from a library that engineers build and extend in Python, Java or other languages. Open source: yes. Keyword libraries to maintain: yes.
  • Playwright test agents (code generation): Playwright's planner agent writes a Markdown test plan, its generator agent turns the plan into ordinary Playwright test files, and its healer agent suggests patches for failing tests. Open source: yes. Output: Playwright test code that a developer reviews and maintains.
  • KaneAI (run-time resolution): KaneAI from TestMu AI interprets each plain English step against the live app, so nobody writes step code or selectors. Step code to write: no. KaneAI exports Selenium, Playwright and Appium code only from tests that have run and passed.
  • Kane CLI (terminal agent): Kane CLI drives Chrome on your machine from a plain English objective typed by a developer or sent by a coding agent such as Claude Code, and reports pass or fail through its exit code. Playwright code export: off by default.

Is Natural Language Test Automation Reliable Enough for Production?

  • Run-to-run variance: In natural language test automation, setting a language model's temperature to 0 does not make step resolution deterministic, because inference output shifts as server load changes the batch size. In one published test, 1,000 completions at temperature 0 produced 80 unique results.
  • Resolution caching: A natural language test behaves like a normal test when the tool resolves each step to a locator once, stores it and replays it, re-asking the model only when the stored locator fails.
  • Generated test review: An AI-generated test that passes proves its steps ran, not that its assertion matches the requirement. 46% of developers in the 2025 Stack Overflow Developer Survey distrust the accuracy of AI output, so every generated test needs a human review.
  • Tests that stay in code: Exact-value assertions, complex fixtures such as seeded database state, and deploy-gating tests belong in code, while new, high-churn flows such as onboarding and checkout suit plain English authoring.

What Is Natural Language Test Automation?

Natural language test automation is automated testing where the test is authored as a plain English instruction and software converts that instruction into executable steps. A step reads "click Checkout and verify the order total is 49.99" instead of a locator and an assertion method.

The term covers two generations of technology that behave very differently. Classical systems parsed the sentence with tokenization and part-of-speech tagging, then matched the parsed words to a fixed set of stored actions. Current systems send the instruction and the live page state to a language model, which infers the intended action and target.

The parser-versus-model distinction matters when you evaluate a tool. A parser only handles phrasings someone mapped in advance, so it fails on a sentence it has not seen. A model handles new phrasing but introduces run-to-run variance. Both are marketed with the same phrase, so ask which one you are buying.

How Does a Plain English Test Step Become an Executed Action?

A plain English step executes in four stages: the system reads the instruction, captures the current application state, picks one element as the target, then performs the action and checks the result. Stage three is where almost every failure happens.

Element resolution is the hard part because a sentence like "click the submit button" can match three elements on a real page. The system has to choose, and how it chooses is the most important property of the tool. Three architectures resolve that choice differently.

Four-stage pipeline for a plain English test step: read the instruction, capture the current application state, pick one element as the target, then perform the action and check the result. Stage three, element resolution, branches into three architectures - generate then commit code (deterministic after generation), map phrases to stored selectors (deterministic at run time), and resolve intent at run time (varies between runs unless cached) - which all converge on stage four.
ArchitectureHow the target is foundRun-to-run behaviorWhere it breaks
Generate then commit codeA model writes a locator once, a human reviews it, and the code is committed to the repository.Identical to any hand-written Playwright or Selenium test after generation.Regenerating a test silently drifts from the version a reviewer approved.
Map phrases to stored selectorsA parser matches the phrase against a stored locator recorded for that step.Deterministic at run time, because no model runs during execution.A rephrased step or a renamed attribute breaks the match.
Resolve intent at run timeA model reads the rendered screen on every run and selects the target semantically.Varies between runs unless the resolved target is cached and replayed.Ambiguous wording and pages with several plausible matches.

That third architecture is the one that defines intent-based testing, where the test binds to the outcome rather than to a stored locator, and it carries a distinct failure mode worth understanding before adopting it.

Playwright ships the generate-then-commit architecture in its own toolchain.

Playwright's planner agent explores the application and writes a Markdown plan, the generator agent turns that plan into Playwright tests and verifies selectors and assertions live as it performs the scenario, and the healer agent replays failing steps and suggests a locator or wait fix.[2] The output is ordinary test code, which is why it inherits ordinary test-code behavior. Our walkthrough of Playwright agents covers that workflow step by step.

Which Tools Let You Write Automated Tests in Plain English?

Tools that let you write automated tests in plain English work in one of three ways. Open-source frameworks such as Cucumber and Robot Framework map English-like steps to code that engineers maintain, Playwright's test agents generate test code from a description, and KaneAI from TestMu AI interprets each step at run time, so nobody writes step code.

The table below sets out the open-source options and TestMu AI's two products by approach, with no ranking, using each project's own documentation as of October 2026.

ToolApproachHow you write a testWhat to check before adopting
Cucumber (open source)BDD: each English step maps to code a developer writesGiven, When and Then steps in a .feature fileEvery step needs a matching step definition, and keywords are ignored during matching, so a Given step and a When step with the same text share one definition.[11]
Robot Framework (open source)Keyword-driven: each line calls a keyword from a libraryKeyword lines in a .robot file, with at least two spaces between a keyword and its arguments[13]Readability depends on the keyword libraries, which teams extend in Python, Java and other languages.[14]
Playwright test agents (open source)Code generation: a description in, Playwright tests outA request to the planner agent, which explores the app and produces a Markdown test plan[2]The generator writes ordinary Playwright test files and the healer suggests patches for failing tests, so a developer still reviews and maintains the suite.
Kane CLI (TestMu AI)Run-time agent in the terminalA plain English objective, typed in the terminal or sent by a coding agent such as Claude CodeIt drives Chrome on your machine and reports pass or fail through its exit code; code export to Playwright in Python or JavaScript is off by default and runs after the session uploads to Test Manager.
KaneAI (TestMu AI)Run-time resolution with code generationPlain English steps, typed or generated from a Jira ticket, PDF, image, spreadsheet or other requirementCode is generated only after every step of a test has run and passed, so a draft that has never run cannot be exported.

Cucumber and Robot Framework give engineering teams readable specifications with full control over the code behind them. Playwright's test agents and Kane CLI suit developers who want the finished test as code, and npx playwright init-agents --loop=claude adds Playwright's agent definitions for Claude Code.

For side-by-side comparisons of commercial tools, see our roundup on codeless test automation and our guide to testRigor alternatives.

What Does Plain English Authoring Actually Improve?

Plain English authoring improves authoring speed first, review speed second, and team readability third. Every gain carries a condition, and the condition decides whether the saving survives a real suite.

The authoring gain is the concrete one. Playwright's generator agent turns a plan into executable tests and verifies selectors and assertions live as it performs the scenario, so a generated test has already run once before a reviewer opens it.[2] That shortens the write-then-debug loop, not the maintenance cycle behind it.

  • Time to first test: Describing a flow in one sentence skips the inspect-element and copy-selector steps that open every hand-written test.
  • First-run verification: A generator that executes a scenario while writing it catches a broken locator before review rather than during the next CI run.
  • Cross-role readability: Gherkin proved plain-language steps read well and still left engineers owning them, so readability alone does not move authoring to product or QA.[9]
  • Existing locator quality: A suite already targeting by role and test id has less selector churn left to recover, so its measurable gain is smaller.[7]

Is Natural Language Test Automation Reliable Enough for Production?

Natural language test automation is reliable for straightforward flows and unreliable as a full replacement for coded suites. The deciding factor is whether the tool re-asks a model on every run. Cached resolution behaves like a normal test; live re-resolution inherits the model's variance.

Two published numbers set the honest expectation. On WebArena, a benchmark of real web tasks driven by natural-language goals, the best GPT-4 based agent reached an end-to-end task success rate of 14.41% against human performance of 78.24%.[3] A systematic review of AI-powered testing tools found they struggle with complex UI changes and contextual understanding, and named false positives and dependency on predefined models as active constraints.[4]

The mechanism behind the variance is more specific than "models are random," and knowing it changes what you ask a vendor. Setting temperature to 0 does not make the output deterministic. Horace He and Thinking Machines Lab generated 1,000 completions from Qwen3-235B-A22B-Instruct-2507 at temperature 0 and got 80 unique completions, with the first divergence at token 103.[5]

Batch size is the cause. Many inference kernels produce slightly different numerical output depending on how many requests are batched together, and server load changes the batch size unpredictably, so the same request can resolve one way under light load and another way at peak.[5] A test suite that re-resolves elements through a shared inference endpoint therefore has a flakiness source that no retry policy in your framework can see.

Cause chain showing why temperature 0 is not deterministic: server load changes how many requests are batched together, the inference kernel returns slightly different numerical output, the same step resolves to a different element, and the run becomes flaky in a way no framework retry policy can see. A lower band shows the control, resolution caching: resolve the step once, store the locator, replay it on every run, and re-resolve only when the stored locator fails. Measured figure: 1,000 completions from Qwen3-235B-A22B-Instruct-2507 at temperature 0 produced 80 unique completions, first diverging at token 103.

The practical control is to stop asking the model during normal runs. Resolve each step once, store the resulting locator, and replay it; let re-resolution fire only when the stored locator fails. That confines model variance to repair time, where a human is already looking. Our guide to the flaky test problem covers how to measure the baseline before you change anything.

Detect and fix flaky tests with TestMu AI

How Do You Know a Generated Test Checks What You Meant?

You read it. A generated test that runs green proves the steps executed, not that the assertion was correct, so every generated test needs a human to confirm the assertion matches the requirement before it enters the suite.

Review time decides whether the authoring savings hold. The 2025 Stack Overflow Developer Survey found that 46% of developers actively distrust the accuracy of AI output while 33% trust it, and only 3% highly trust it.[1] Distrust at that level is a review budget, and it has to be planned rather than discovered.

There is a structural argument here that vendor documentation rarely raises. Writing a test and writing the implementation are two independent expressions of the same requirement, and the disagreement between them is what catches a misunderstanding. When one model generates both the code and the test that checks it, both come from the same interpretation, and that cross-check disappears.

Practitioners on Hacker News described the same loss of independent verification: a generated test can be technically sound and still test the wrong thing, because the design flaw was never caught by an independent implementer.[6] Keep the requirement, not the generated test, as the thing a reviewer checks against, and never let the same agent author both the feature and its gating test.

Does Plain English Authoring Reduce Test Maintenance?

Plain English authoring reduces authoring time reliably and maintenance time conditionally. Self-healing converts a broken locator from a rewrite into a review, which is cheaper but not free, because a human still approves each proposed repair.

Before attributing selector churn to selectors, check how the selectors were written. Playwright's own guidance is direct about the cause: "Your DOM can easily change so having your tests depend on your DOM structure can lead to failing tests," and it recommends targeting elements by role, label, or an explicit test id rather than a CSS class chain such as button.buttonIcon.episode-actions-later.[7]

The difference between DOM-coupled and role-based locators has a cost consequence. A suite built on inspector-copied XPath breaks on cosmetic refactors, and moving it to role and test-id targeting removes most of that churn with no AI in the loop.

A suite already using role-based locators has far less maintenance for a tool to save, so the business case for adopting one is weaker there. Measure your current break rate and its causes first. Our reference on Selenium locators lists the stable strategies.

In the Reddit thread "Anyone using natural language for test automation or still writing selectors?" on r/ExperiencedDevs, practitioners argued that flakiness is both the core end-to-end testing problem and the core language-model problem, and one commenter reported running about 40% of their tests in natural language with code still required for complex scenarios.[8] The thread reached no consensus that plain English authoring is production-ready.

The strongest objection in the r/ExperiencedDevs thread was about the baseline rather than the technology. One commenter argued that copying an elaborate selector out of the element inspector guarantees brittle tests, and that structuring the UI so tests select by visible content and role removes the problem at its source. That critique is correct, and it is the first thing to fix.

Note

Note: Run plain English and coded suites across 3,000+ browser and OS combinations with TestMu AI. Try free!

Is Plain English Test Authoring Just Gherkin and BDD With a Language Model?

No, and the difference is the mapping layer. Gherkin needed a step-definition method for every phrase, so the plain language was only an interface over code someone still wrote. A language model resolves the sentence directly, with no step definitions to maintain.

Here is one sign-in check written both ways. Cucumber's own reference says that "keywords are not taken into account when looking for a step definition," so every line of the feature file needs a step definition behind it.[11]

Feature: Sign in
  Scenario: A registered user signs in
    Given I am on the sign-in page
    When I sign in as "ana@example.com"
    Then I see the greeting "Welcome back, Ana"

The step definitions behind it, written in JavaScript with cucumber-js and the Playwright library, use regular functions rather than arrow functions, because an arrow function cannot reach the shared world object as this.[12]

import { Before, After, Given, When, Then }
  from '@cucumber/cucumber';
import { chromium } from 'playwright';

Before(async function () {
  this.browser = await chromium.launch();
  this.page = await this.browser.newPage();
});

After(async function () {
  await this.browser.close();
});

Given('I am on the sign-in page', async function () {
  await this.page.goto('https://app.example.com/login');
});

When('I sign in as {string}', async function (email) {
  await this.page.getByLabel('Email').fill(email);
  await this.page.getByLabel('Password')
    .fill(process.env.TEST_PASSWORD);
  await this.page
    .getByRole('button', { name: 'Sign in' })
    .click();
});

Then('I see the greeting {string}', async function (t) {
  await this.page.getByText(t).waitFor();
});

In KaneAI, the plain English steps are the test itself, written in the style of the KaneAI authentication and session management guide, with the password held as a stored secret:

go to https://app.example.com/login
type "ana@example.com" in the email field
type {{secret.ana_password}} in the password field
click on the "Sign in" button
assert "Welcome back, Ana" is visible

The Cucumber version needs three step functions and two hooks for three sentences, and if the Sign in button is renamed, the feature file still reads correctly while the getByRole line fails. The KaneAI version has no step file and no selector, because KaneAI works out which field and button the words refer to on the live page, so its reading of your words becomes part of the test. That trade is why the review and caching controls earlier in this guide matter.

The precedent is worth studying because it failed for a reason that has nothing to do with parsing. Andy Knight, who teaches BDD practice at Automation Panda, describes the mechanical friction plainly: Gherkin lets people write specs in plain language, "but the steps they write must be written perfectly and identically every time."[9]

The organizational failure mattered more. Gherkin assumed business stakeholders would write or review the scenarios, and in practice engineers wrote and maintained them alone. Developers on Hacker News described the same outcome, one calling Cucumber "very, very poorly suited for writing anything beyond very basic specifications."[10] The plain-language artifact became documentation nobody read.

For any plain English suite you adopt now, name the owner of the tests before you start, because the tests default to whoever is on call for the pipeline. Then check whether non-engineers genuinely author tests after month one, since that is the assumption the previous generation got wrong. Our Cucumber testing guide covers the step-definition model in detail.

Which Tests Should Stay in Code?

Keep code wherever the assertion is exact or the setup is complex. Plain English is well suited to navigation and happy-path flows, and poorly suited to precise numeric checks, elaborate fixtures, and any test whose failure blocks a deploy.

Use these criteria to split the suite:

  • Exact-value assertions: Tax, interest, and currency rounding checks belong in code, because a semantic assertion that a total "looks correct" is not an assertion.
  • Complex fixtures: Tests needing seeded database state, mocked third-party responses, or a specific permission matrix are faster to express in code than in prose.
  • Deploy gates: A blocking test must fail for exactly one reason, so remove every avoidable variance source from the tests that hold the release.
  • High-churn UI flows: Onboarding and checkout paths that change every sprint are the best candidates to move, since authoring cost dominates there.
  • Coverage gaps: Flows nobody automated because writing the test cost more than the risk justified are pure upside for plain English authoring.

Ambiguity is the practical limit on prose. "Verify the dashboard loads correctly" gives a model nothing to check, while "verify the dashboard shows a row for order 1042" is checkable. Write steps that name an observable fact, and the ambiguity objection largely goes away.

Which Plain English Testing Approach Fits Your Team?

Pick the approach by who will own the tests and whether the tests should live as code in your repository.

  • Developers own the automation - Cucumber and other BDD frameworks give you specifications that product owners can read, at the cost of a step-definition library that someone has to maintain.
  • Engineers maintain keyword libraries - Robot Framework lets testers compose readable tests from keywords that engineers build and extend.
  • Developers want English in and code out - Playwright's test agents and Kane CLI both start from a plain English description and can end in Playwright code that lives in the repository and runs in CI.
  • Testers or product managers own regression tests - A tool that interprets each step, such as KaneAI, lets them write and maintain tests without code; shortlist on application coverage, on how AI repairs are reviewed, and on which export formats are available today.
  • The current suite is stable - Keep it and fix DOM-coupled locators first, because role and test-id locators remove most selector churn with no AI involved.

Enterprise teams should also confirm that every AI repair leaves an audit record and that credentials stay out of the test text. KaneAI records each accepted or rejected heal in its audit logs and references stored secrets as variables inside a step.

For a starting set of cases, TestMu AI's test case generator drafts test cases from a short description of what you want to test, and our guide to test authoring covers how teams design cases before they automate them.

How Do You Add Plain English Authoring Without Losing Control of the Suite?

Insist on a review gate before execution and an export path to code you own. Those two properties keep a plain English suite reviewable in a pull request and portable if you change tools, which is what teams lose when they adopt an AI app testing tool without checking for either.

Ownership is the failure teams hit. Tests authored inside a vendor interface never reach the repository, so nobody reviews them in a diff, nobody can grep them, and the suite cannot move. The second failure is unreviewed generation: an agent proposes a plan and the plan runs before anyone reads it.

KaneAI from TestMu AI is built around both gates. It converts a natural-language prompt, a Jira ticket, or a PRD into a structured test plan, and that plan is human-readable and reviewable before anything executes, as you can follow step by step when you author a KaneAI test in natural language. The capabilities that matter for keeping control are specific:

  • Plan review gate: Test plans are approved by a human before execution, and user input takes priority over agent decisions during a run.
  • Code export: KaneAI generates Selenium, Playwright and Appium code from tests that have run and passed; Cypress and WebdriverIO export are coming soon. The KaneAI code generation docs list each language, and the generated suite can live in your repository rather than only in a dashboard.
  • Reusable modules: Common steps such as login become a block authored once, so fixing the module updates every test that uses it.
  • Reviewable heals: When KaneAI adapts a locator or refactors a step, the change appears as a before and after diff that a reviewer accepts, rejects or edits, and the KaneAI auto-heal docs state that changes are never silently committed.

KaneAI does not remove the review step, and TestMu AI's own guidance avoids claims of zero maintenance. Self-healing re-anchors a step when the UI shifts, which turns a rewrite into an approval, and smart versioning keeps a history so a heal that changed behavior can be rolled back. The same plain English authoring reaches native apps too, where a phrase like "scroll down until the Submit button is visible" resolves into a real gesture through KaneAI's scroll-until action on mobile rather than a brittle coordinate swipe.

The walkthrough below shows a described flow becoming an executable test case, including the plan step that a reviewer approves.

Youtube thumbnail

For work in the terminal, developers can use Kane CLI, TestMu AI's terminal agent for developers and coding agents such as Claude Code, Codex CLI and Cursor. It drives Chrome from a plain English objective, returns exit codes that CI can read, and can export the run as Playwright code in Python or JavaScript once code export is turned on.

KaneAI covers desktop web and native mobile apps, so native desktop applications need another tool, and a team that wants English only as a specification layer over hand-written code is better served by a BDD framework. The AI agent for test authoring page covers generating test cases from Jira tickets and PRDs.

For a broader view of where model-driven tooling fits across a suite, our overview of ai in test automation maps the categories, and No-code test automation covers the builder-based alternative.

Automate web and mobile tests with KaneAI by TestMu AI

Conclusion

Natural language test automation earns its place as an authoring layer rather than a replacement for coded suites. The property that decides whether it works is element resolution. Cache the resolved locator and a plain English test behaves like a normal test. Re-ask a model on every run and you have added a flakiness source your framework cannot see.

Start by measuring your current break rate and its causes, then move role-based locators in before you move a tool in. Pick new, high-churn flows for the pilot, keep exact-value and deploy-gating tests in code, and require a review gate plus an export path from any tool you adopt. Read the getting started with KaneAI guide when you are ready to run the first flow.

Testing web or mobile apps without writing code? KaneAI by TestMu AI turns plain-English instructions into tests.

To run your first test, start free, or
for a full walkthrough of the product.

Author

...

Prince Dewani

Blogs: 30

  • Linkedin

Prince Dewani is a Community Contributor at TestMu AI specializing in AI agents, software testing, QA, and SEO. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI, and presented academic research on AI agents at PBCON-01. At TestMu AI, he has also carried out extensive cross-browser research on the support of modern web technologies such as WebGPU, WebAssembly, WebXR, WebGL2 and other web technologies, validating their compatibility and feature parity across major browsers and rendering engines through rigorous hands-on testing. Prince has hands-on experience building AI agent workflows using Anthropic Claude, Google Antigravity, n8n, LangChain, and other agentic frameworks, and works regularly with MCP and A2A protocols. He shares his work with 5,500+ QA engineers, developers, DevOps experts, tech leaders, and AI agent practitioners on LinkedIn.

Reviewer

...

Srinivasan Sekar

Reviewer

  • Linkedin

Srinivasan Sekar is Director of Engineering at TestMu AI, where he leads engineering and open-source initiatives behind the Selenium and Appium automation grid and owns TestMu AI's MCP Server. A committer to Appium and a contributor to Selenium, WebdriverIO, Taiko, and AppiumTestDistribution, he brings over 15 years of experience in quality engineering and open-source technologies. He is the author of the Apress book 'The MCP Standard: A Developer's Guide to Building Universal AI Tools with the Model Context Protocol,' a Certified Kubernetes and Cloud Native Associate, and an international conference speaker. Before TestMu AI he spent over eight years at Thoughtworks as a Principal Consultant and Quality Architect. Srinivasan holds a B.Tech in Information Technology from Anna University.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Natural Language Test Automation FAQs

Did you find this page helpful?

More Related Blogs

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