How an Enterprise SaaS Team Cut AI Test Authoring Cost with Kane CLI

22% lower

AI cost to write passing tests

10 of 14

Tests written for less

Only what each step needs

Context per step

Ingested once

PRD context, reused for every test

Quote

"Our objectives were fine. What we were paying for was the agent rereading its own conversation on every step."

Director of Quality Engineering, Enterprise SaaS platform

Illustration of a terminal running tests, a test file with passing steps, a cost chart with a lower second bar, and stacked credit coins

Overview

The company builds a business operations platform used by mid-market and enterprise teams. Its product covers supplier records, document workflows, approvals, data imports and reporting, all delivered as a web application.

The QA organization had moved early on AI-assisted testing. Instead of hand-coding every browser test, engineers wrote the objective in natural language and handed it to an AI coding agent driving Playwright.

The approach worked. Tests were written faster than before. But the AI bill behind them grew with every test, and it grew in ways the team could not predict.

This is the story of how the team compared that setup against Kane CLI, and what it found.

Scale of the Test Estate

The platform's surface is wide. A single release can touch supplier management, document archiving, approval chains, CSV imports, workspace settings and analytics views.

Many of those screens are hard to automate. Parts of the interface sit inside Shadow DOM components, embedded iframes and canvas-based views, where locators break easily and a test has to reason about what is on screen.

Every new feature adds objectives to the backlog. With AI writing most new tests, authoring cost had become a line item that scaled directly with the product roadmap.

The Challenge

The general-purpose agent was capable, but it was not built for testing. It ran each test as one long session and carried the full conversation forward on every step.

That design has a cost. Each time the agent took an action, checked the page or corrected a locator, it read the entire session history again. The longer a test took to get right, the more each additional step cost.

110k-904k

Tokens to write a single test

243k

Median tokens per test

~91%

Of tokens spent rereading the conversation so far

Requirements made it worse. Every new session started without the PRD, so engineers pasted the spec or acceptance criteria into the conversation again. The agent then carried that text through every turn of every test, paying for the same requirements over and over.

The result was spend the team could not forecast. A test's cost depended less on how complex the flow was and more on how many turns the agent needed to finish it.

The gap showed up most on the awkward screens. A test that had to retry a locator inside a Shadow DOM component, or work out state on a canvas view, kept extending its session. Every retry made the next step more expensive, even though the flow itself had not changed.

Why Kane CLI

The team did not want to change how it wrote objectives. Engineers were used to describing a flow in natural language, and that part worked. What needed to change was the cost of turning that description into a passing test.

Kane CLI is built for testing rather than general coding. Instead of carrying one long session forward, it sends each step only the context that step needs: the objective, the current state of the page and the action in hand. A retry on a difficult locator does not make every later step more expensive.

Requirements are handled the same way. Kane CLI's assurance loop takes the PRD in once and keeps that context for the whole testing cycle, from use cases to the final verdict, instead of asking for it again in every session.

Before switching, the team ran both tools side by side on the same objectives and set rules so neither could look better than it was:

  • Same objectives, same app. Each tool received identical written objectives and had to write and run the test itself.
  • Passes checked outside both tools. A test passed only when an independent check of the app's saved state confirmed the goal. Neither tool's own "done" was trusted.
  • Only shared passes counted. A test entered the cost comparison only when both tools passed it, so a failed run never counted as a saving.
  • Cost read from each tool's own output. Kane CLI cost came from the credits it reported at the end of each run. The agent's cost came from its own end-of-run estimate.

How Kane CLI Is Being Used

The team now routes new test objectives through Kane CLI across the platform's main areas:

  • Record management: editing suppliers without touching other records, archiving documents, adding and removing rows
  • Forms and embedded content: editing contacts inside Shadow DOM components and verifying details inside iframes
  • Data movement: importing contacts from CSV and extracting contact information
  • Transactions and settings: declining purchases, rescheduling reservations and updating workspace settings
  • Analysis views: comparing reports and selecting items on canvas-based views

Four Parts of Kane CLI Did Most of the Work

Assurance loop

The PRD goes in once

The team ingests each PRD with kane-cli context ingest, and Jira tickets and Confluence pages come in directly by URL. kane-cli design turns that source into business use cases, scenarios and acceptance criteria, and the context is stored and reused for every test that follows. A shared context store keeps the whole team on the same version of the spec.

test.md

Every test saved as a file

Each designed test lands as a natural language _test.md file, with every step wired to the acceptance criterion it proves. The files are committed next to the code, so a test is written once and kept, and kane-cli cover reports which criteria are proved and which are still gaps.

Replay

Recorded steps run again

When a test.md runs again, Kane CLI replays its recorded steps instead of working the flow out from scratch. kane-cli testrun run executes a whole set of test.md files as one run, with one sealed evidence pack for the suite.

Autoheal

Only the drifted step is re-resolved

When the UI changes, adaptive healing, on by default, re-resolves the affected step against the new page. Each step is anchored to the user-facing element, not a selector, and matches are confidence-scored: a reworded label is absorbed, while a genuinely ambiguous change is flagged instead of healed past.

Every run ends with the credits it used, so authoring spend is visible test by test instead of arriving as one total at the end of the month.

Results

22%

Lower AI cost on 14 shared passing tests ($6.58 vs $8.48)

10 of 14

Tests cheaper by more than 5%

53%

Largest single saving, archiving a document

Across the 14 tests both tools passed, Kane CLI cost $6.58 against $8.48 for the general-purpose agent, 22% less AI cost for the same passing tests.

Kane CLI was cheaper by more than 5% on 10 of the 14 tests and within 5% on 2. The largest gaps came on the screens that had been hardest to automate: archiving a document cost 53% less, and editing a contact inside Shadow DOM cost 41% less. On 2 tests, finding a supplier and verifying a contact in an iframe, the agent was cheaper. The 22% is the total across all 14, not the best case.

The saving held when runs were repeated. On a newer Kane CLI build, run four times per objective across 12 objectives, including public sites, Kane CLI cost 39% less and was cheaper on every objective. Pass rates stayed close: 46 of 48 runs for Kane CLI, 47 of 48 for the agent.

Quote

"A test now costs what the test needs. A tricky Shadow DOM screen no longer makes every step after it more expensive."

Senior SDET, Enterprise SaaS platform

Looking Forward

With authoring cost tied to each test, the team plans to budget AI spend per release rather than reconcile it afterwards. Credits per objective give engineering leads a number they can plan against.

The next step is to bring the existing backlog of hand-written objectives into Kane CLI, starting with the areas that change most often between releases.

Over time, the team expects test authoring to become a predictable part of each release, sized by the work in the release rather than by how long an AI session happens to run.

Ready to Make AI Test Authoring Cost Predictable?

Kane CLI turns natural language objectives into tested, passing browser tests while spending context only where each step needs it. See what your next test would cost.

Schedule a demo

Industry

Enterprise SaaS

Product used

Workload

AI-written browser tests

Headline result

22% lower AI authoring cost

More related customer stories

left arrowright arrow

TestMu AI for Enterprise

Get access to solutions built on enterprise-grade security, privacy, & compliance