pairwise-test-case-generator
БесплатноБез исполняемых скриптовНе проверенUse when a function or endpoint takes 3 or more inputs whose combinations matter and the full Cartesian product is too large. Combines boundary values…
от testland★ 18 звёзд на GitHubОб этом скилле
pairwise-test-case-generator
Overview
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.
When to use
- A function / endpoint takes 3 or more enumerable inputs (roles, tiers, statuses, feature flags, locales).
- Cartesian product would produce >100 tests.
- Pairs of inputs interact (e.g.
tier=enterprise+feature=ssohas a different code path thantier=free+feature=sso). - Existing tests cover only a few hand-picked combinations - the team wants systematic coverage.
If only one input has multiple values, use
boundary-value-generator
instead - boundary analysis is the right tool for single-input
testing.
How to use
- Confirm the target takes 3+ interacting inputs whose Cartesian product exceeds ~100 tests.
- Pick a coverage strength (default 2-wise; go 3-wise only after a triplet bug slips through).
- Choose the reduction tool (default PICT; AllPairs for pytest-native, CATS for an in-process library).
- Author the input spec in YAML: each input's
nameandvalues, plus domainconstraints. - Run the tool to compute the reduced set and emit it in your runner's parametrize format.
- Read the coverage report - accept constraint-driven gaps, or raise strength for real uncovered pairs.
- Commit the spec to git as the source of truth; regenerate cases whenever a value or rule changes.
Step 1 - Pick the coverage strength
| 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.
Step 2 - Pick the tool that computes the reduced set
| 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.
Step 3 - Author the input specification
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.
Step 4 - Emit in the test
Установить pairwise-test-case-generator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pairwise-test-case-generator?
Use when a function or endpoint takes 3 or more inputs whose combinations matter and the full Cartesian product is too large. Combines boundary values, equivalence classes and pairwise (or N-wise) reduction into parameterized cases in the project's runner format.
Как установить скилл pairwise-test-case-generator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pairwise-test-case-generator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic