AI-Assisted Equivalence Class Tables with Claude Code
Creating equivalence class tables by hand is tedious. You need to identify every input field, define equivalence classes for each one, plan test cases with the right marker logic, set up coverage formulas, and format everything correctly in Excel. For a form with ten fields, that can easily take an hour — and most of that time is spent on mechanical work, not on thinking about what to test.
Starting today, Nanook ships a Claude Code skill and a slash command that automate the entire process. Describe your test object — a page, an API endpoint, a form — and Claude generates a complete, formatted Excel file with correct markers, formulas, and 100% coverage.
What’s New
The nanook-table repository now includes two new additions for Claude Code users:
- Skill:
create-equivalence-class-table— a comprehensive reference document that teaches Claude how Nanook decision tables work: section types, marker rules, the CASCADE pattern, generator syntax, multi-sheet architecture, and color formatting. It lives in.claude/skills/and is automatically available when you work in the nanook-table project. - Command:
/createEquivalenceClassTable— a slash command that triggers the skill with a specific test object. You provide the name of a page, API endpoint, or form, and Claude handles the rest.
How to Use It
Step 1: Open Claude Code in the nanook-table project
Navigate to your nanook-table working directory and start Claude Code. The skill is picked up
automatically from the .claude/skills/ directory — no configuration needed.
cd your-project
claude
Step 2: Run the command
Use the slash command with a description of what you want to test:
/createEquivalenceClassTable Customer Registration Form
Or describe an API endpoint:
/createEquivalenceClassTable POST /api/v1/orders
Or a specific page in your application:
/createEquivalenceClassTable Invoice Create Page
Step 3: Claude does the work
Behind the scenes, Claude follows the skill’s workflow:
- Analyzes the test object — identifies fields, validation rules, dependencies, and logical field groups
- Defines equivalence classes per field using established patterns (valid, empty, tooLong, invalid format, etc.)
- Plans test cases with the CASCADE pattern for exact 100% coverage
- Generates a TypeScript script that uses
exceljsto create a fully formatted Excel file - Runs the script to produce the
.xlsxfile - Verifies that the file can be read by Nanook’s
ImporterXlsx
The result is a production-ready Excel file in your resources/ directory with:
- Color-coded headers (dark blue for table headers, blue for sections, green for summary)
- COUNTA formulas that automatically count equivalence classes per field
- Coverage formulas in the summary row that calculate total and per-test-case coverage
- Correct
x,a,emarkers following the CASCADE pattern - Generator references like
gen:1:faker:person.fullNamefor realistic test data - Multi-sheet architecture when the test object has more than 6–8 fields
What Is the CASCADE Pattern?
CASCADE is the marker strategy that makes 100% coverage possible with a minimal number of test
cases. The idea is simple: each error test case targets one specific equivalence class in one
field. For fields after the target, the test case marks all equivalence classes
(a on the preferred value, e on the rest), which increases coverage
efficiently. For fields before the target, only the preferred value is marked with
x.
The result is a staircase-shaped pattern of markers that, when summed up, covers every possible combination exactly once:
| inv_1 | inv_2 | inv_3 | inv_4 | valid_1
field1 valid | | x | x | x | x
empty | x | | | |
field2 valid | a | | x | x | x
empty | e | x | | |
field3 valid | a | a | | x | x
empty | e | e | x | |
field4 valid | a | a | a | | x
empty | e | e | e | x |
The skill knows these rules and applies them automatically. You get mathematically correct 100% coverage without having to think about marker placement.
A Practical Example
Suppose you run:
/createEquivalenceClassTable User Registration Form
Claude analyzes the form and identifies fields like username (required text), email (required, format validation), password (required, minimum length), and terms acceptance (required boolean). It then creates equivalence classes for each:
| Field | Equivalence Classes |
|---|---|
| username | valid, empty, whitespace, tooLong |
| valid, invalid, empty | |
| password | valid, empty, tooShort |
| termsAccepted | true, false |
That gives us 4 × 3 × 3 × 2 = 72 total combinations. With CASCADE, Claude creates 8 error test cases (one per non-preferred equivalence class) plus 1 happy-path test case — 9 test cases total that cover all 72 combinations exactly.
The generated script lands at scripts/create-user-registration-table.ts and the
Excel file at resources/user-registration-tests.xlsx.
What Happens Next
Once you have the Excel file, the standard Nanook workflow takes over:
- Review the table in any spreadsheet application — check that the fields, equivalence classes, and markers match your domain knowledge
- Adjust as needed — add fields, rename classes, change generators
- Generate fixtures by running your generation script, which uses Nanook’s
ImporterXlsxto read the table and produce test data files - Integrate the generated fixtures into your test suite
The AI gets you to a solid starting point in seconds. Your domain expertise refines it into exactly the right test specification.
Requirements
- Claude Code installed and configured
- The
nanook-tablerepository cloned locally (the skill and command are part of the repo) exceljsavailable as a dependency (used by the generated scripts to create formatted Excel files)
Why This Matters
The hardest part of systematic test design is not understanding the theory — it is doing the mechanical work. Identifying equivalence classes, calculating coverage, placing markers correctly, formatting the spreadsheet — these are tasks that follow clear rules but take significant time.
By encoding Nanook’s decision table format into a Claude Code skill, we let AI handle the mechanics while you focus on the decisions that actually matter: what to test and why.
Want to try it? Clone nanook-table, open Claude Code, and run
/createEquivalenceClassTable with your test object. Or start with the Quickstart Guide if you are new to Nanook.