diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-19 16:12:02 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-19 16:12:02 -0500 |
| commit | b11cfd66b185a253fecf10ad06080ae165f32a74 (patch) | |
| tree | 95c19d266aff9515acc0ab2dac2a90285dd1103e /pairwise-tests/references/pict_syntax.md | |
| parent | a8deb6af6a14bc5e56e86289a2858a0258558388 (diff) | |
| download | rulesets-b11cfd66b185a253fecf10ad06080ae165f32a74.tar.gz rulesets-b11cfd66b185a253fecf10ad06080ae165f32a74.zip | |
feat: adopt pairwise-tests (PICT combinatorial) + cross-reference from existing testing skills
Forked verbatim from omkamal/pypict-claude-skill (MIT). LICENSE preserved.
Renamed from `pict-test-designer` to `pairwise-tests` — technique-first
naming so users invoking "pairwise" or "combinatorial" find it; PICT
remains the tool under the hood.
Bundle (skill-runtime only):
pairwise-tests/SKILL.md (renamed, description rewritten)
pairwise-tests/LICENSE (MIT, preserved)
pairwise-tests/references/pict_syntax.md
pairwise-tests/references/examples.md
pairwise-tests/scripts/pict_helper.py (Python CLI for model gen / output fmt)
pairwise-tests/scripts/README.md
Upstream's repo-level docs (README, QUICKSTART, CONTRIBUTING, etc.) and
`examples/` dir (ATM + gearbox walkthroughs — useful as reading, not as
skill-runtime) omitted from the fork. Attribution footer added.
Cross-references so /add-tests naturally routes to /pairwise-tests when
warranted:
- add-tests/SKILL.md Phase 2 step 8: if a function in scope has 3+ parameters
each taking multiple values, surface `/pairwise-tests` to the user before
proposing normal category coverage. Default continues with /add-tests;
user picks pairwise explicitly.
- claude-rules/testing.md: new "Combinatorial Coverage" section after the
Normal/Boundary/Error categories. Explains when pairwise wins, when to
skip (regulated / provably exhaustive contexts, ≤2 parameters, non-
parametric testing), and points at /pairwise-tests.
- languages/python/claude/rules/python-testing.md: new "Pairwise /
Combinatorial for Parameter-Heavy Functions" subsection under the
parametrize guidance. Explains the pytest workflow: /pairwise-tests
generates the matrix, paste into pytest parametrize block, or use
pypict helper directly.
Mechanism note: cross-references are judgment-based — Claude reads the
nudges in add-tests/testing/python-testing and acts on them when appropriate,
not automatic dispatch. Craig can still invoke /pairwise-tests directly when
he already knows he wants combinatorial coverage.
Makefile SKILLS extended; make install symlinks /pairwise-tests globally.
Diffstat (limited to 'pairwise-tests/references/pict_syntax.md')
| -rw-r--r-- | pairwise-tests/references/pict_syntax.md | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/pairwise-tests/references/pict_syntax.md b/pairwise-tests/references/pict_syntax.md new file mode 100644 index 0000000..d25fb57 --- /dev/null +++ b/pairwise-tests/references/pict_syntax.md @@ -0,0 +1,83 @@ +# PICT Syntax Reference + +> **Note**: This is a placeholder file. Complete syntax documentation is coming soon! +> +> For now, please refer to the official PICT documentation: +> - [Microsoft PICT on GitHub](https://github.com/microsoft/pict) +> - [PICT User Guide](https://github.com/microsoft/pict/blob/main/doc/pict.md) + +## Quick Reference + +### Basic Model Structure + +``` +# Parameters +ParameterName: Value1, Value2, Value3 +AnotherParameter: ValueA, ValueB, ValueC + +# Constraints (optional) +IF [ParameterName] = "Value1" THEN [AnotherParameter] <> "ValueA"; +``` + +### Parameter Definition + +``` +ParameterName: Value1, Value2, Value3, ... +``` + +### Constraint Syntax + +``` +IF <condition> THEN <condition>; +``` + +### Operators + +- `=` - Equal to +- `<>` - Not equal to +- `>` - Greater than +- `<` - Less than +- `>=` - Greater than or equal to +- `<=` - Less than or equal to +- `IN` - Member of set +- `AND` - Logical AND +- `OR` - Logical OR +- `NOT` - Logical NOT + +### Example Constraints + +``` +# Simple constraint +IF [OS] = "MacOS" THEN [Browser] <> "IE"; + +# Multiple conditions +IF [Environment] = "Production" AND [LogLevel] = "Debug" THEN [Approved] = "False"; + +# Set membership +IF [UserRole] = "Guest" THEN [Permission] IN {Read, None}; +``` + +## Coming Soon + +Detailed documentation will include: +- Complete grammar specification +- Advanced features (sub-models, aliasing, seeding) +- Negative testing patterns +- Weight specifications +- Order specifications +- Examples for each feature + +## Contributing + +If you'd like to help complete this documentation: +1. Fork the repository +2. Add content to this file +3. Submit a pull request + +See [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines. + +## External Resources + +- [Official PICT Documentation](https://github.com/microsoft/pict/blob/main/doc/pict.md) +- [pypict Documentation](https://github.com/kmaehashi/pypict) +- [Pairwise Testing Explained](https://www.pairwisetesting.com/) |
