Spec-Driven Testing: Verify What Your Coding Agent Built

Kane CLI turns your spec's acceptance criteria into tests, runs them in a real browser, and reports which criteria are proven and which are owed.

npm install -g @testmuai/kane-cli

Start Free

Trusted by 3M+ users globally at

Microsoft
OpenAI
Nvidia
Boomi

"We have tripled our tests and are now executing tests in less than 2 hours with 78% Faster Test Execution"

Hrishi Potdar, Quality Engineering Architect

Boomi
GitHub
Best Egg

"We figured out a more efficient way to monitor system health and resolve failures earlier in lower environments."

Tenny, Engineering Operations Lead

Best Egg
Workday
Akamai
Louis Vuitton
NBCUniversal
City Furniture

"TestMu AI has significantly boosted our testing speed, is easy to implement, and provides exceptional support."

Nicholas Paulsen, Senior Quality Engineer

City Furniture
Cox
Transavia

"With 70% faster test execution, TestMu AI helped us achieve faster time-to-market and enhanced CX."

Daniel de Bruijn, Quality Assurance Automation Engineer

Transavia
Estée Lauder
TripAdvisor
boohoo

TestMu AI-WRITTEN TESTSAI-WRITTEN TESTS

22 of 60 AI Test Suites From Buggy Code Missed the Bug

In an experiment TestMu AI published in October 2026, 27 of 60 suites written from the buggy code caught the bug. From the contract only, 55 caught it and none missed it.

  • Gemini 3.1 Pro Preview and 3.8 Flash wrote the suites
  • Six small functions, each with one seeded bug
  • 120 suites in all: 60 from code, 60 from the contract
Results of a seeded-bug experiment TestMu AI published in October 2026: 22 of 60 AI-written test suites from buggy code missed the bug, 0 of 60 written from the contract only missed it, and 55 of those caught it

Why Does Spec-Driven Development Need Testing?

These checks read the artifacts and code, or test functions with generated inputs. Spec-driven testing runs the app against each criterion and keeps proof.

GitHub Spec Kit v1.3.3

GitHub Spec Kit v1.3.3

Core commands plan and build the feature. Testing against a running app comes from community extensions.

OpenSpec v1.17.0

OpenSpec v1.17.0

A verify step compares the code with the spec, and the validate command checks the spec's structure.

Kiro

Kiro

Turns EARS requirements into properties, then runs random inputs through the code to test them.

Spec-Driven Testing vs TDD, BDD, Spec-Driven Development

The table compares what each method treats as the source of truth, who writes the test, what decides pass or fail and how coverage is counted.

Spec-driven testing

TDD

BDD (Gherkin)

Spec-driven development, no testing step

Source of truth

The spec, with an ID for each acceptance criterion

The failing unit test

Feature files with Given/When/Then scenarios

spec.md, requirements.md or a change proposal

Who writes the test

Derived from the spec; a person approves the criteria

Developer, before the code

Product, QA and dev together; developers write step definitions

Usually nobody, or the coding agent after the code

What decides pass or fail

A check against the criterion's expected result

Assertions in the unit test

Step definition assertions

Code review, or the agent's own claim

When the spec changes

Changed criteria are flagged and affected tests re-planned for review

Developer edits tests by hand

Feature files edited by hand

Agent regenerates code

Coverage measured by

Criteria proven by a passing run, and criteria still owed

Lines and branches

Scenarios passing

Tasks ticked

How Does Spec-Driven Testing Work?

Each tab is one Kane CLI command: snapshot the spec, extract its criteria, design the tests, run them, then measure coverage.

Snapshot the Spec
Extract and Review
Design Tests
Run in a Browser
Cover and Maintain

Snapshot the Spec as a Hashed Version

kane-cli context ingest saves your spec.md, PRD or ticket as a content-hashed snapshot in a local .context/ store, so every later test traces to an exact version.

Read the Context Docs
Snapshot the Spec

Any Spec Format

Markdown and other text, PDF, Word .docx, images, and Jira, Confluence or Linear URLs.

Content-Hashed Versions

Each snapshot is identified by a hash of its bytes, so a changed spec becomes a new version.

CI Mode Saves Only

With --mode ci, ingest lands the files and exits 0 without starting the extract chat.

Spec testability check

Check if a Spec Is Testable With a Free In-Browser Checker

Paste a spec to see which criteria name a result a machine can compare, which use vague words, and which follow EARS patterns.

Runs in your browser. Your spec is not uploaded or stored.

Rewrite 3 Untestable Criteria in EARS Notation

"Checkout should be fast"

"Checkout should be fast"

Vague and unmeasured. Rewrite: WHEN the user selects Pay, the app SHALL show the confirmation within 3 seconds.

"Show an error for a bad coupon"

"Show an error for a bad coupon"

Which error, for which coupon? Rewrite: IF a coupon has expired, THEN the cart SHALL show 'This code has expired'.

"Users can apply discounts"

"Users can apply discounts"

A capability with no result. Rewrite: WHEN code SAVE10 is applied to a 50.00 cart, the total SHALL show 45.00.

Run Spec-Driven Testing on a GitHub Spec Kit Spec

Kane CLI ingests Spec Kit's spec.md as written. The full run on kane-cli 0.8.18 is in Spec Kit with Claude Code from the command line.

Commands from the Kane CLI assurance loop. Check out our documentation

Copied to Clipboard!
TestMu AIGoogle Antigravity

Now in the Google Antigravity Marketplace

Using Antigravity? Add the TestMu AI plugin, and your agent gets the Kane CLI skill.

See how to add it

Build a Spec Traceability Matrix From Kane CLI Runs

Depth is what a sealed run proved and completeness is what the design still owes. Illustrative example, not output from a real run.

Test

Status

Proof

ac-1 Cart total updates when quantity changes

cart-qty_test.md

Proven

Evidence pack from the passing run

ac-2 Code SAVE10 takes 10% off

cart-coupon_test.md

Designed, not yet run

None yet

ac-3 Free shipping at 50.00 or more

None

Owed

Listed by cover gaps

4 Techniques for Deriving Test Cases From a Spec

Each derives cases from the spec without reading the code. Kane CLI design covers happy, negative, boundary, edge and security paths.

Equivalence Partitioning

Equivalence Partitioning

Split the inputs into classes the spec treats alike, then test one value from each class.

Boundary Value Analysis

Boundary Value Analysis

Test the edges of each range the spec names, such as 49.99, 50.00 and 50.01 for free shipping.

Decision Tables

Decision Tables

List every combination of conditions a rule names, with the expected result for each one.

State Transition Testing

State Transition Testing

Map each state and event the spec describes, then test every allowed and forbidden transition.

Pick a Property-Based or E2E Test per Spec Criterion

Kiro's docs call property-based testing "evidence of correctness, not a proof". Use it inside one function; check what users see end to end.

Best check

Why

For any quantity from 1 to 99, the line total equals price times quantity

Property test

Pure arithmetic over a range; random inputs find edge cases

WHEN SAVE10 is applied, the cart page shows the new total

End-to-end

Depends on UI, API and session state together

IF payment is declined, THEN the order is not created and the user sees 'Payment declined'

End-to-end

Crosses services; the visible message is the oracle

When Is Spec-Driven Testing the Wrong Tool?

It checks that the build matches written criteria. When the question is "is this good?", one of these fits better.

Exploratory Testing

Exploratory Testing

Problems nobody wrote down need a person or an exploratory agent to find them.

UX Quality

UX Quality

"Feels clunky" is real feedback with no oracle. Run usability sessions for it.

Wrong Specs

Wrong Specs

If the spec is wrong, the test verifies the wrong behaviour. Review the criteria with product first.

Load and Performance

Load and Performance

A response-time criterion can be checked once; sustained load needs a load-testing tool.

AI Output Quality

AI Output Quality

It checks app behaviour and does not replace evals for what a model writes.

Visual Regressions

Visual Regressions

Specs rarely name every pixel, so catch unplanned layout changes with visual regression testing.

Some Love from our Customers

Excited to Share My Learning Journey with Kane AI & Lambda Tool!
I'm pleased to announce that I've recently gained hands-on experience exploring Kane AI through the Lambda Tool and it’s been a fantastic journey of upskilling!see more >

KaneAI

Suryateja Goud

Suryateja Goud

suryateja-goud

handle

Attended an onboarding call for KaneAI by TestMu AI.
KaneAI is the world's first end-to-end software testing agent.see more >

KaneAI

Anmol Baranwal

Anmol Baranwal

anmol-baranwal

handle

I just discovered KaneAI by TestMu AI, and it's a game-changer! Let me walk you through how it's transforming my testing workflowsee more >

KaneAI

Muhammad Noorani

Muhammad Noorani

muhammadnoorani

handle
View all reviews

FAQs About Spec-Driven Testing

TestMu AI for Enterprise

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