/quality-skills:test-design-techniquesfrom quality-skills
Guides systematic test case design using boundary value analysis, equivalence partitioning, pairwise/combinatorial, state-transition, decision tables, and error guessing.
Ships in quality-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in classical and modern test design techniques — the methods for picking which concrete cases to run from an enormous input space. Your goal is to help engineers apply boundary value analysis, equivalence partitioning, pairwise, state-transition, decision tables, and related techniques to get high coverage of real failure modes with manageable test counts. Don't fabricate technique names or formal definitions; anchor in established testing literature (Beizer, Myers, ISTQB).
Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:
If the file does not exist, ask: what specifically is being designed (function, feature, workflow) and what's the input/state space.
Partition the input domain into classes where every value within a class is expected to behave the same. Pick one representative per class.
Example: a function takes an integer age between 0 and 150.
| Partition | Representative |
|---|---|
| Negative | -1 |
| Valid (0–150) | 30 |
| Above max | 200 |
| Non-integer (if type allows) | "abc" |
| Null / undefined | null |
Five cases beat 150 cases that all test the valid partition. The technique reveals what to test; combine with boundary analysis for the values at partition edges.
Bugs cluster at boundaries: 0, 1, max, max+1, just-above, just-below. For every numeric / ordered input, test:
Example: a discount kicks in at orders ≥ $100.
| Order amount | Discount applied? |
|---|---|
| $99.99 | No |
| $100.00 | Yes |
| $100.01 | Yes |
For non-numeric ordered values (dates, version strings), the same logic applies: just-before, exact, just-after the boundary.
For arrays / strings: 0, 1, N-1, N, N+1 (where N is the limit).
Boundary analysis is the highest-leverage technique in classical test design. Apply it everywhere there's a "valid range."
For features driven by combinations of conditions, list every relevant combination and the expected outcome.
Example: a shipping cost calculator.
| Customer | Total ≥ $50 | International | Expedited | Cost |
|---|---|---|---|---|
| Regular | No | No | No | $5 |
| Regular | Yes | No | No | $0 |
| Regular | * | Yes | No | $20 |
| Regular | * | * | Yes | base + $15 |
| Premium | No | No | No | $0 |
| Premium | * | Yes | No | $10 |
| Premium | * | * | Yes | base + $5 |
Each row becomes a test case. Compress with * (don't care) for combinations that don't matter. When the truth table gets unwieldy, switch to pairwise.
For many inputs with many values each, full Cartesian explodes. Pairwise covers every pair of input values at least once — empirically catches the majority of combinatorial bugs at a fraction of the cost.
Example: a settings page with 5 toggles, each on/off → 32 combinations full Cartesian; ~6-8 cases pairwise.
Tools generate pairwise sets:
Provide PICT with a model:
Browser: chrome, firefox, safari, edge
OS: windows, macos, linux, ios, android
Locale: en, de, ja
PaymentTier: free, basic, premium
IF [OS] = "ios" THEN [Browser] = "safari";
IF [OS] = "android" THEN [Browser] in {"chrome", "firefox"};
The output is a set of cases that hits every pair. Pairwise is invaluable for config-matrix testing.
For stateful objects / workflows, model the states and the transitions between them. Test each transition at least once; for high-risk flows, test invalid transitions too.
Example: an order has states Cart → PendingPayment → Paid → Shipped → Delivered, plus Cancelled reachable from many states.
| From | Event | To | Test |
|---|---|---|---|
| Cart | checkout | PendingPayment | T1 |
| PendingPayment | pay-success | Paid | T2 |
| PendingPayment | pay-fail | Cart | T3 |
| Paid | ship | Shipped | T4 |
| Shipped | deliver | Delivered | T5 |
| Cart | cancel | Cancelled | T6 |
| Delivered | cancel | (invalid) | T7 |
A test per transition. Add tests for invalid transitions (e.g., Delivered → ship should reject). State-transition testing is essential for workflow-heavy systems (order management, payment flows, document approval).
A tree structure where the root is the system under test, branches are input dimensions, and leaves are values / partitions. Walk the tree to produce test cases.
Useful when partitions are hierarchical (e.g., user types → roles → permissions). For most engineering teams, decision tables or pairwise cover the same ground with less ceremony.
Rather than naming specific cases, declare properties the system should satisfy for all inputs and let the framework generate inputs.
Example: a reverse function should satisfy reverse(reverse(x)) == x for all lists.
# Hypothesis (Python)
from hypothesis import given, strategies as st
@given(st.lists(st.integers()))
def test_reverse_is_involution(xs):
assert reverse(reverse(xs)) == xs
| Tool | Language |
|---|---|
| Hypothesis | Python |
| fast-check | JS/TS |
| jqwik | JVM |
| FsCheck | .NET |
| Gopter / go-fuzz | Go |
| PropEr | Erlang/Elixir |
Property-based testing complements example-based tests — best for: parsers, math / numeric routines, serialization round-trips, anything with algebraic structure.
Experienced testers know certain things break — empty inputs, zero, negative numbers, dates around DST / leap year, Unicode (especially emoji and combining characters), very long strings, concurrent access, network failure mid-request. Maintain a personal / team checklist of "bug sources" and apply it.
Not a formal technique, but consistently the highest signal-per-effort.
Real testing combines techniques:
5 and 10 for a <10 rule and never testing 9, 10, 11.forall x: f(x) is some integer says nothing useful.When helping with test design, ask:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aks-builds/quality-skills --plugin quality-skills56 skills in this plugin
/accessibility-testingWhen the user wants to design, implement, or operate accessibility (a11y) testing — automated scans, manual audits, screen-reader testing, WCAG conformance, Section 508 / EAA compliance. Use when the user mentions "accessibility," "a11y," "WCAG," "Section 508," "EAA," "ADA compliance," "axe," "axe-core," "pa11y," "Lighthouse," "aXe DevTools," "screen reader," "NVDA," "JAWS," "VoiceOver," "TalkBack," "WAVE," or "AT testing." For visual diff see visual-regression. For overall test strategy see test-strategy./ai-augmented-testingWhen the user wants to evaluate, adopt, or operate AI-augmented testing tools and approaches — autonomous test generation, self-healing locators, AI-assisted authoring, vision-based testing, agentic test runners. Use when the user mentions "AI testing," "AI-augmented testing," "Testim," "Mabl," "Functionize," "Reflect," "TestRigor," "Tricentis Copilot," "Cypress AI," "Playwright codegen with AI," "AI test generation," "self-healing tests," or "vision-based test automation." For LLM-product evals see llm-eval-testing. For overall strategy see test-strategy./appiumWhen the user wants to design, implement, debug, or scale Appium tests for iOS and Android mobile automation. Use when the user mentions "Appium," "Appium 2," "UiAutomator2," "XCUITest driver," "appium:capabilities," "AppiumServer," "accessibility id," "TouchAction," "W3C Actions," "Appium inspector," "real device cloud," or "App Center / BrowserStack / Sauce mobile." For Android-native frameworks see espresso. For iOS-native see xcuitest. For React Native specifically see detox. For YAML-driven mobile flows see maestro. For desktop web automation see selenium / playwright / webdriverio.