What Is SPECTRA? AI-Native Test Case Generation From Your Documentation

What Is SPECTRA? AI-Native Test Case Generation From Your Documentation

What Is SPECTRA?

SPECTRA reads your product documentation, generates versioned Markdown test cases, verifies every step with an independent critic, and executes them through a deterministic state machine. Your docs already describe how the product should behave. SPECTRA turns that into a suite you can review, version and trace.

It makes no model calls of its own. Analysis, generation and verification run inside your coding agent (Claude Code, Cursor, GitHub Copilot, Codex CLI or Gemini CLI) through skills and a critic subagent that SPECTRA installs into your repository.

In this article we’ll take the documentation of the Windows Calculator demo and go all the way: analyze, generate, verify, execute and trace.

Why Do You Need SPECTRA?

Hand-written test casesSPECTRA
Source of truthTester memoryYour docs, indexed
Time to a first suiteDaysMinutes
Invented stepsUncheckedRejected by the critic
Boundary dataPicked by handSupplied by Testimize
CoverageA spreadsheetDocs, criteria and automation on one dashboard

Getting Started

Install the CLI, initialize the repository and index your documentation.

dotnet tool install -g Spectra.CLI
spectra init
spectra docs index

spectra init creates the configuration, the folders, the skills and the critic subagent.

my-project/
├── spectra.config.json
├── docs/
│   ├── _index/
│   └── criteria/_criteria_index.yaml
├── test-cases/
├── .claude/
│   ├── agents/spectra-critic.agent.md
│   └── skills/spectra-*/SKILL.md
└── templates/bug-report.md

Step 1: Analyze

In your IDE, ask the coding agent for test cases. SPECTRA first analyzes the indexed docs, groups the behaviors by the categories in your configuration, and recommends a count before anything is written.

Create test cases for the standard calculator
CategoryRecommended
happy_path82
negative34
boundary38
edge_case30
error_handling24
keyboard_interaction28
Total236

You confirm or change the number. Nothing is generated until you do.

Step 2: Generate, With Testimize Boundaries

Test cases are written in batches. For every boundary or equivalence case, SPECTRA asks Testimize for the values and puts them into the prompt verbatim, so a test for “the input accepts up to 16 digits” really uses 16 and 17 digits, not whatever the model remembers.

Every test case is a Markdown file with YAML frontmatter. It lives in Git next to your code and diffs like code.

---
id: TC-999
title: Verify division by zero displays an error
priority: high
category: error_handling
source: docs/standard-calculator.md#error-handling
---

## Preconditions
Calculator is open in Standard mode and displays 0

## Steps
1. Enter 10
2. Press ÷
3. Enter 0
4. Press =

## Expected Result
Display shows "Cannot divide by zero" without crashing

Step 3: Verify With an Independent Critic

A separate critic subagent checks every step and expected result against the source docs. It runs with its own context and never sees the generator’s reasoning, only the step and the documentation. Each test case gets a verdict.

VerdictMeaningWhat happens
GroundedEvery step is supported by the docsKept
PartialSome steps are supported, some are assumptionsKept and flagged for review
HallucinatedContradicts or invents behaviorRejected

In the Calculator run, 236 test cases were requested, 189 came back grounded and 13 were flagged. One draft claimed that division by zero shows infinity; the docs say the display shows an error. The critic rejected it.

Note

A rejected test case is a feature, not a failure. Every hallucination the critic catches is one your testers would otherwise have executed and argued about.

The suite is also validated structurally, so broken frontmatter or duplicate IDs never reach the run.

spectra validate

Step 4: Execute and Ask

Tell SPECTRA what changed and it picks what to run. After a change to how Calculator handles division by zero, it searches the suite for the affected cases, starts a run and opens the execution console.

We changed how Calculator handles division by zero. What should I run?

Testers record each verdict in the console. If a step is unclear, they ask in the chat and the answer comes from the source docs, not from memory. At the end, SPECTRA finalizes the run and writes an HTML report with pass rate, timing and every result, ready to attach to the release.

Test cases that need automating can be handed straight to the BELLATRIX Agent, which runs them on the live app and writes the automated test, tagged with the SPECTRA ID.

Step 5: Trace Coverage

One coverage number hides more than it shows. SPECTRA measures three: how much of the documentation has test cases, how many acceptance criteria are covered, and how much of the suite is automated.

spectra ai analyze --coverage --output-format json
spectra dashboard --output ./site
DimensionCalculator demo
Documentation coverage87.5%
Acceptance criteria coverage100%
Automation coverage25.7%

A GitHub Action can rebuild the dashboard on every push and publish it to Cloudflare Pages behind GitHub sign-in, so only people with access to the repository can see it.

Summary

SPECTRA turns documentation into grounded, versioned test cases, catches what the model invents before a tester ever sees it, runs the suite with answers from the docs, and shows exactly what is still uncovered. Install it, index your docs, and ask your coding agent for your first suite.

Download Read the Docs

Related Articles

Desktop Automation, Automation Tools

Introducing BELLATRIX Agent: From Manual Test Case to Automated Test

BELLATRIX Agent runs a manual test case on your real app, validates every locator, reuses your page objects and hands back a built, linked automated test.

Introducing BELLATRIX Agent: From Manual Test Case to Automated Test

Automation Tools, Testing Practices

Fewer Test Cases, More Bugs Found: Introducing Testimize

Testimize is an open-source .NET library that generates boundary-aware test data and uses a Hybrid Artificial Bee Colony algorithm to keep the best cases.

Fewer Test Cases, More Bugs Found: Introducing Testimize

Testing Practices

Testing for Developers- Fundamental Test Process

In the series we will define the basic terms that every developer needs to know about testing. The purpose is to give all team members a shared understanding of

Testing for Developers- Fundamental Test Process

Testing Practices

Testing for Developers- Testing Types

In the series we will define the basic terms that every developer needs to know about testing. The purpose is to give all team members a shared understanding of

Testing for Developers- Testing Types

Testing Practices

Testing for Developers- What Is Testing?

In the series we will define the basic terms that every developer needs to know about testing. First, we will start with defining what exeactly is testing and d

Testing for Developers- What Is Testing?
Anton Angelov

About the author

Anton Angelov is Managing Director, Co-Founder, and Chief Test Automation Architect at Automate The Planet — a boutique consulting firm specializing in AI-augmented test automation strategy, implementation, and enablement. He is the creator of BELLATRIX, a cross-platform framework for web, mobile, desktop, and API testing, and the author of 8 bestselling books on test automation. A speaker at 60+ international conferences and researcher in AI-driven testing and LLM-based automation, he has been recognized as QA of the Decade and Webit Changemaker 2025.