/qa-test-data:pairwise-test-case-generatorfrom qa-test-data
Generates reduced test sets using pairwise (all-pairs) testing for functions or endpoints with 3+ interacting inputs. Combines boundary values, equivalence classes, and N-wise reduction into parameterized test cases.
Ships in qa-test-data. 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.
When a function takes multiple inputs whose interactions matter, the naive test set is the Cartesian product: 4 roles × 4 tiers × 5 features × 6 locales = 480 tests. Most teams give up before authoring all 480 and end up with happy-path-only coverage that misses interaction bugs.
The fix is all-pairs (pairwise) testing - pick a smaller test set that covers every pair of input values across the full matrix. Empirically, 2-wise coverage finds the majority of interaction bugs at a fraction of the test count. ISTQB catalogues this technique as pairwise testing, "a black-box test technique in which test conditions are pairs of parameter-value pairs" (commonly also called all-pairs testing).
This skill takes a multi-input spec and emits a reduced test set covering 1-wise / 2-wise / N-wise combinations.
tier=enterprise + feature=sso
has a different code path than tier=free + feature=sso).If only one input has multiple values, use
boundary-value-generator
instead - boundary analysis is the right tool for single-input
testing.
name and values, plus domain constraints.| Strength | Coverage |
|---|---|
| 1-wise | Every individual value of every input appears in at least one test. |
| 2-wise (pairwise) | Every pair of values across two inputs appears together. |
| 3-wise | Every triplet of values across three inputs appears together. |
| N-wise | Every N-tuple appears. |
| Strength | Test count for 4×4×5×6 input space (480 max) | Notes |
|---|---|---|
| 1-wise | 6 | Just touches every value once. |
| 2-wise | ~30 | Standard recommendation; finds most interaction bugs. |
| 3-wise | ~120 | Use when triplet interactions matter (e.g. role × tier × feature). |
| Cartesian | 480 | Use only for small input spaces (≤4 inputs, ≤3 values each). |
Default: 2-wise. Promote to 3-wise only when an incident postmortem shows a triplet bug slipped through 2-wise.
| Tool | Language | Notes |
|---|---|---|
| PICT | Standalone | Microsoft's canonical pairwise tool; CLI; deterministic output. |
| AllPairs | Python | Library; integrates with pytest. |
| CATS | Multi-lang | Open-source Combinatorial Test Generator. |
Default: PICT - language-agnostic CLI, deterministic CSV output that any test runner can parametrize. Use AllPairs when the spec needs to live in Python alongside pytest fixtures; use CATS when the team needs an in-process Java/multi-language library API.
A YAML format the skill consumes:
inputs:
- name: role
values: [admin, manager, standard, read_only]
- name: tier
values: [free, starter, pro, enterprise]
- name: feature
values: [sso, audit_log, api_access, custom_branding, support_priority]
- name: locale
values: [en-US, ja-JP, de-DE, ar-SA, fr-FR, pt-BR]
strength: 2
constraints:
# Mutually exclusive combinations (suppress these from generation):
- "tier=free AND feature=sso" # SSO is paid-only
- "tier=free AND feature=audit_log" # Audit log is paid-only
constraints exclude combinations that don't make sense in the
domain - including them would generate tests for impossible states.
The reduced set is emitted in the runner's native parametrize format -
PICT-style CSV, pytest @pytest.mark.parametrize, Jest / Vitest
test.each, or xUnit [Theory] + [MemberData]. Copy-paste-ready
snippets for each format:
references/output-formats.md.
After generation, the skill emits a coverage report:
## Coverage report - strength 2
**Inputs:** 4 (role × 4 values, tier × 4 values, feature × 5 values, locale × 6 values)
**Cartesian total:** 480 cases
**Generated cases:** 30
**Constraints suppressed:** 8 cases (tier=free × {sso,audit_log})
### Pair coverage matrix
| Pair | Required | Covered | Coverage |
|-------------------------|---------:|--------:|---------:|
| role × tier | 16 | 14 | 88% |
| role × feature | 20 | 20 | 100% |
| role × locale | 24 | 24 | 100% |
| tier × feature | 20 | 18 | 90% |
| tier × locale | 24 | 24 | 100% |
| feature × locale | 30 | 30 | 100% |
### Gaps (uncovered pairs)
- (role=read_only, tier=free) - suppressed by constraint
- (tier=starter, feature=audit_log) - increase strength or hand-add
The team reviews gaps; either accepts them (constraint-driven gap = OK) or escalates to 3-wise.
A capability check takes four inputs: role (4 values), tier (4),
feature (5), and locale (6). The Cartesian product is
4 × 4 × 5 × 6 = 480 tests - too many to author or run per commit.
Author the spec with the two paid-only constraints, set strength: 2,
and run PICT. It returns ~30 cases covering every value pair, with the
8 impossible tier=free × {sso, audit_log} combinations
suppressed. The coverage report confirms 100% pair coverage on five of
the six input pairs and flags the two constraint-driven gaps (e.g.
role=read_only × tier=free) for review. Result: interaction
coverage from 30 tests instead of 480, checked into git as the
parametrize table.
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Cartesian product test set when input count > 3 | Tests grow combinatorially; CI time explodes; flaky. | Use 2-wise; promote to 3-wise per incident. |
Skipping constraints for impossible combinations | Tests fail for the wrong reason - testing tier=free + sso, which the system rejects. | Always declare domain constraints upfront. |
| Hard-coded test list maintained by hand | Combinatorial set is fragile; adding one input value 2x's the test count. | Generate from the spec; check the spec into git. |
| Failing to update the spec when business rules change | Test set drifts from production reality. | Spec is the source of truth; reviewers reject PRs that update tests without updating the spec. |
| Using 1-wise as the default | Misses every interaction bug; trivially covers single-input behavior. | 2-wise minimum; 1-wise only for inputs known not to interact. |
boundary-value-generator - sibling skill for single-input boundary cases.negative-test-generator - sibling skill for rejection-path coverage.What SKILL.md sets; muted values are Claude Code's defaults
2 plugins ship this exact skill · first indexed Nov 12, 2026
12 skills in this plugin
/boundary-value-generatorUse when writing or extending tests for a function, form field or endpoint with limits (min/max values, string length in characters or bytes, collection size), or after a bug at a limit, such as a maximum-length value rejected or a too-short one accepted: generates the boundary-value cases, one below, at and above each bound, plus one representative per equivalence class, and emits them as parameterized tests (pytest @parametrize, Jest test.each, xUnit InlineData)./faker-dataFixes test data that breaks tests - factory values in a shape the code under test rejects (a phone number that is not E.164), fixtures that only pass when the whole suite runs in order, and random values that make an assertion pass or fail depending on the run. Authors test-data factories with Faker: the Python `faker` library, the `@faker-js/faker` JS port, and the `faker-ruby` gem - install per language, the provider catalogue (person / internet / location / date / finance / lorem), locale selection and multi-locale mode, and seed-based determinism for reproducible runs. Scope is generating fresh values for tests that start from nothing, not replacing values inside a dataset that already holds real records - that goes to pii-masking-pipeline-builder. Use when fixtures need realistic values, a stable shape, or a fixed seed.npx claudepluginhub testland/qa --plugin qa-test-dataOther plugins' skills for the same job