
Pict Test Designer
- 42 installs
- 16 repo stars
- Updated November 20, 2025
- jackspace/claudeskillz
Design pairwise (PICT) test cases from requirements or code - parameters, values, constraints, and expected results.
About
Uses PICT pairwise combinatorial testing to generate efficient test suites from requirements or code. A developer uses it to get broad coverage with minimal test cases for features, forms, or API endpoints.
- Generates PICT models with parameters, values, and constraints
- Outputs a markdown table of test cases and expected results
Pict Test Designer by the numbers
- 42 all-time installs (skills.sh)
- +2 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #1,262 of 2,155 Testing & QA skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jackspace/claudeskillz --skill pict-test-designerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 42 |
|---|---|
| repo stars | ★ 16 |
| Last updated | November 20, 2025 |
| Repository | jackspace/claudeskillz ↗ |
What it does
Design pairwise (PICT) test cases from requirements or code - parameters, values, constraints, and expected results.
Files
PICT Test Designer
This skill enables systematic test case design using PICT (Pairwise Independent Combinatorial Testing). Given requirements or code, it analyzes the system to identify test parameters, generates a PICT model with appropriate constraints, executes the model to generate pairwise test cases, and formats the results with expected outputs.
When to Use This Skill
Use this skill when:
- Designing test cases for a feature, function, or system with multiple input parameters
- Creating test suites for configurations with many combinations
- Needing comprehensive coverage with minimal test cases
- Analyzing requirements to identify test scenarios
- Working with code that has multiple conditional paths
- Building test matrices for API endpoints, web forms, or system configurations
Workflow
Follow this process for test design:
1. Analyze Requirements or Code
From the user's requirements or code, identify:
- Parameters: Input variables, configuration options, environmental factors
- Values: Possible values for each parameter (using equivalence partitioning)
- Constraints: Business rules, technical limitations, dependencies between parameters
- Expected Outcomes: What should happen for different combinations
Example Analysis:
For a login function with requirements:
- Users can login with username/password
- Supports 2FA (on/off)
- Remembers login on trusted devices
- Rate limits after 3 failed attempts
Identified parameters:
- Credentials: Valid, Invalid
- TwoFactorAuth: Enabled, Disabled
- RememberMe: Checked, Unchecked
- PreviousFailures: 0, 1, 2, 3, 4
2. Generate PICT Model
Create a PICT model with:
- Clear parameter names
- Well-defined value sets (using equivalence partitioning and boundary values)
- Constraints for invalid combinations
- Comments explaining business rules
Model Structure:
# Parameter definitions
ParameterName: Value1, Value2, Value3
# Constraints (if any)
IF [Parameter1] = "Value" THEN [Parameter2] <> "OtherValue";Refer to references/pict_syntax.md for:
- Complete syntax reference
- Constraint grammar and operators
- Advanced features (sub-models, aliasing, negative testing)
- Command-line options
- Detailed constraint patterns
Refer to references/examples.md for:
- Complete real-world examples by domain
- Software function testing examples
- Web application, API, and mobile testing examples
- Database and configuration testing patterns
- Common patterns for authentication, resource access, error handling
3. Execute PICT Model
Generate the PICT model text and format it for the user. You can use Python code directly to work with the model:
# Define parameters and constraints
parameters = {
"OS": ["Windows", "Linux", "MacOS"],
"Browser": ["Chrome", "Firefox", "Safari"],
"Memory": ["4GB", "8GB", "16GB"]
}
constraints = [
'IF [OS] = "MacOS" THEN [Browser] IN {Safari, Chrome}',
'IF [Memory] = "4GB" THEN [OS] <> "MacOS"'
]
# Generate model text
model_lines = []
for param_name, values in parameters.items():
values_str = ", ".join(values)
model_lines.append(f"{param_name}: {values_str}")
if constraints:
model_lines.append("")
for constraint in constraints:
if not constraint.endswith(';'):
constraint += ';'
model_lines.append(constraint)
model_text = "\n".join(model_lines)
print(model_text)Using the helper script (optional): The scripts/pict_helper.py script provides utilities for model generation and output formatting:
# Generate model from JSON config
python scripts/pict_helper.py generate config.json
# Format PICT tool output as markdown table
python scripts/pict_helper.py format output.txt
# Parse PICT output to JSON
python scripts/pict_helper.py parse output.txtTo generate actual test cases, the user can: 1. Save the PICT model to a file (e.g., model.txt) 2. Use online PICT tools like:
- https://pairwise.yuuniworks.com/
- https://pairwise.teremokgames.com/
3. Or install PICT locally (see references/pict_syntax.md)
4. Determine Expected Outputs
For each generated test case, determine the expected outcome based on:
- Business requirements
- Code logic
- Valid/invalid combinations
Create a list of expected outputs corresponding to each test case.
5. Format Complete Test Suite
Provide the user with: 1. PICT Model - The complete model with parameters and constraints 2. Markdown Table - Test cases in table format with test numbers 3. Expected Outputs - Expected result for each test case
Output Format
Present results in this structure:
````markdown
PICT Model
# Parameters
Parameter1: Value1, Value2, Value3
Parameter2: ValueA, ValueB
# Constraints
IF [Parameter1] = "Value1" THEN [Parameter2] = "ValueA";Generated Test Cases
| Test # | Parameter1 | Parameter2 | Expected Output |
|---|---|---|---|
| 1 | Value1 | ValueA | Success |
| 2 | Value2 | ValueB | Success |
| 3 | Value1 | ValueB | Error: Invalid combination |
...
Test Case Summary
- Total test cases: N
- Coverage: Pairwise (all 2-way combinations)
- Constraints applied: N
````
Best Practices
Parameter Identification
Good:
- Use descriptive names:
AuthMethod,UserRole,PaymentType - Apply equivalence partitioning:
FileSize: Small, Medium, Largeinstead ofFileSize: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 - Include boundary values:
Age: 0, 17, 18, 65, 66 - Add negative values for error testing:
Amount: ~-1, 0, 100, ~999999
Avoid:
- Generic names:
Param1,Value1,V1 - Too many values without partitioning
- Missing edge cases
Constraint Writing
Good:
- Document rationale:
# Safari only available on MacOS - Start simple, add incrementally
- Test constraints work as expected
Avoid:
- Over-constraining (eliminates too many valid combinations)
- Under-constraining (generates invalid test cases)
- Complex nested logic without clear documentation
Expected Output Definition
Be specific:
- "Login succeeds, user redirected to dashboard"
- "HTTP 400: Invalid credentials error"
- "2FA prompt displayed"
Not vague:
- "Works"
- "Error"
- "Success"
Scalability
For large parameter sets:
- Use sub-models to group related parameters with different orders
- Consider separate test suites for unrelated features
- Start with order 2 (pairwise), increase for critical combinations
- Typical pairwise testing reduces test cases by 80-90% vs exhaustive
Common Patterns
Web Form Testing
parameters = {
"Name": ["Valid", "Empty", "TooLong"],
"Email": ["Valid", "Invalid", "Empty"],
"Password": ["Strong", "Weak", "Empty"],
"Terms": ["Accepted", "NotAccepted"]
}
constraints = [
'IF [Terms] = "NotAccepted" THEN [Name] = "Valid"', # Test validation even if terms not accepted
]API Endpoint Testing
parameters = {
"HTTPMethod": ["GET", "POST", "PUT", "DELETE"],
"Authentication": ["Valid", "Invalid", "Missing"],
"ContentType": ["JSON", "XML", "FormData"],
"PayloadSize": ["Empty", "Small", "Large"]
}
constraints = [
'IF [HTTPMethod] = "GET" THEN [PayloadSize] = "Empty"',
'IF [Authentication] = "Missing" THEN [HTTPMethod] IN {GET, POST}'
]Configuration Testing
parameters = {
"Environment": ["Dev", "Staging", "Production"],
"CacheEnabled": ["True", "False"],
"LogLevel": ["Debug", "Info", "Error"],
"Database": ["SQLite", "PostgreSQL", "MySQL"]
}
constraints = [
'IF [Environment] = "Production" THEN [LogLevel] <> "Debug"',
'IF [Database] = "SQLite" THEN [Environment] = "Dev"'
]Troubleshooting
No Test Cases Generated
- Check constraints aren't over-restrictive
- Verify constraint syntax (must end with
;) - Ensure parameter names in constraints match definitions (use
[ParameterName])
Too Many Test Cases
- Verify using order 2 (pairwise) not higher order
- Consider breaking into sub-models
- Check if parameters can be separated into independent test suites
Invalid Combinations in Output
- Add missing constraints
- Verify constraint logic is correct
- Check if you need to use
NOTor<>operators
Script Errors
- Ensure pypict is installed:
pip install pypict --break-system-packages - Check Python version (3.7+)
- Verify model syntax is valid
References
- references/pict_syntax.md - Complete PICT syntax reference with grammar and operators
- references/examples.md - Comprehensive real-world examples across different domains
- scripts/pict_helper.py - Python utilities for model generation and output formatting
- PICT GitHub Repository - Official PICT documentation
- pypict Documentation - Python binding documentation
- Online PICT Tools - Web-based PICT generator
Examples
Example 1: Simple Function Testing
User Request: "Design tests for a divide function that takes two numbers and returns the result."
Analysis:
- Parameters: dividend (number), divisor (number)
- Values: Using equivalence partitioning and boundaries
- Numbers: negative, zero, positive, large values
- Constraints: Division by zero is invalid
- Expected outputs: Result or error
PICT Model:
Dividend: -10, 0, 10, 1000
Divisor: ~0, -5, 1, 5, 100
IF [Divisor] = "0" THEN [Dividend] = "10";Test Cases:
| Test # | Dividend | Divisor | Expected Output |
|---|---|---|---|
| 1 | 10 | 0 | Error: Division by zero |
| 2 | -10 | 1 | -10.0 |
| 3 | 0 | -5 | 0.0 |
| 4 | 1000 | 5 | 200.0 |
| 5 | 10 | 100 | 0.1 |
Example 2: E-commerce Checkout
User Request: "Design tests for checkout flow with payment methods, shipping options, and user types."
Analysis:
- Payment: Credit Card, PayPal, Bank Transfer (limited by user type)
- Shipping: Standard, Express, Overnight
- User: Guest, Registered, Premium
- Constraints: Guests can't use Bank Transfer, Premium users get free Express
PICT Model:
PaymentMethod: CreditCard, PayPal, BankTransfer
ShippingMethod: Standard, Express, Overnight
UserType: Guest, Registered, Premium
IF [UserType] = "Guest" THEN [PaymentMethod] <> "BankTransfer";
IF [UserType] = "Premium" AND [ShippingMethod] = "Express" THEN [PaymentMethod] IN {CreditCard, PayPal};Output: 12-15 test cases covering all valid payment/shipping/user combinations with expected costs and outcomes.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Planned
- Additional real-world examples (e-commerce, API testing, mobile apps)
- Enhanced PICT syntax reference documentation
- Improved helper scripts for PICT model generation
- Integration with test management tools
- Support for higher-order combinatorial testing (3-way, 4-way)
[1.0.2] - 2025-10-19
Added
- Automotive Gearbox Control System example - Advanced PICT example for safety-critical systems
examples/gearbox-specification.md- Comprehensive 10-section specification (3,600+ words)- System components (sensors, actuators, controls)
- Operating modes (Manual, Sport, Eco)
- Functional requirements and safety features
- Error handling and fault tolerance
- Performance, environmental, and integration requirements
examples/gearbox-test-plan.md- Complete PICT test plan- 12 parameters with complex interdependencies
- 14 business rules and safety constraints
- 40 test cases from ~159 billion combinations (99.999999975% reduction)
- Expected outputs with detailed system responses
- Priority-based execution plan, coverage analysis, traceability matrix
- Risk assessment for safety-critical scenarios
Changed
- Updated
examples/README.mdwith gearbox example section - Added advanced constraint modeling patterns documentation
- Expanded learning points with multi-mode testing and fault injection examples
Documentation
- Comprehensive gearbox specification covering all aspects of transmission control
- Detailed test plan demonstrating advanced PICT usage
- Learning material for complex parameter interactions and safety constraints
[1.0.1] - 2025-10-19
Added
- Claude Code Plugin Marketplace support - Users can now install via
/plugincommands .claude-plugin/marketplace.json- Marketplace catalog for plugin discovery.claude-plugin/plugin.json- Complete plugin metadata with keywords and repository info- Plugin installation as Method 1 in README.md (easiest installation method)
Changed
- Updated README.md with plugin marketplace installation instructions
- Renumbered installation methods (now 5 methods: marketplace, git clone, submodule, minimal zip, full zip)
- Updated author information: Omar Kamal Hosney <omar.wasat@gmail.com>
Improved
- Easier installation process via plugin marketplace
- Automated updates when using plugin marketplace
- Better discoverability through Claude Code's plugin system
[1.0.0] - 2025-10-19
Added
- Initial release of PICT Test Designer skill
- Core functionality for test case design using PICT methodology
- Comprehensive ATM system testing example
- Installation guide for Claude Code CLI and Desktop
- MIT License with proper attributions
- Contributing guidelines
- Documentation structure (README, SKILL.md, examples)
- GitHub Actions CI workflow
- Example directory with ATM specification and test plan
- Minimal installation package (9.3 KB) with essential files only
- GitHub Release v1.0.0 with downloadable assets
- Multiple installation methods (git clone, submodule, minimal ZIP, full ZIP)
Features
- Automated parameter identification from requirements
- PICT model generation with constraints
- Expected output determination
- Pairwise test case generation
- Support for multiple testing domains
- Comprehensive documentation and examples
- 80-99% test case reduction while maintaining coverage
Fixed
- Corrected installation instructions (removed non-existent CLI commands)
- Updated to use proper manual installation via
.claude/skills/directory - Removed CLAUDE.md from version control (now user-specific)
Documentation
- README.md: Corrected installation methods with 4 options
- QUICKSTART.md: Updated with accurate installation steps
- releases/README.md: Guide for using minimal package
- README-INSTALL.txt: User-friendly guide included in minimal ZIP
Credits
- Built on Microsoft PICT
- Uses pypict Python bindings by Kenichi Maehashi
- Designed for Claude AI by Anthropic
Version History
Versioning Scheme
- Major version (X.0.0): Incompatible API changes or major feature additions
- Minor version (0.X.0): New features in a backward-compatible manner
- Patch version (0.0.X): Backward-compatible bug fixes
Release Types
- [Unreleased]: Changes in development but not yet released
- [Version]: Released version with date
Change Categories
- Added: New features
- Changed: Changes in existing functionality
- Deprecated: Soon-to-be removed features
- Removed: Removed features
- Fixed: Bug fixes
- Security: Security vulnerability fixes
---
How to Contribute to Changelog
When submitting a pull request, add your changes to the [Unreleased] section under the appropriate category (Added, Changed, Fixed, etc.).
Example:
## [Unreleased]
### Added
- New example for mobile app testing (#42)
### Fixed
- Typo in installation instructions (#38)The maintainers will move items from [Unreleased] to a versioned release when publishing a new version.
Contributing to pypict-claude-skill
Thank you for your interest in contributing to the PICT Test Designer Claude Skill! This document provides guidelines and instructions for contributing.
Ways to Contribute
1. Add Examples
- Real-world test scenarios from different domains
- Industry-specific testing patterns
- Complex constraint scenarios
- Edge cases and advanced usage
2. Improve Documentation
- Fix typos or unclear explanations
- Add tutorials or guides
- Translate documentation
- Improve code comments
3. Enhance the Skill
- Optimize test case generation
- Add new constraint patterns
- Improve expected output determination
- Extend domain support
4. Report Issues
- Bug reports
- Feature requests
- Documentation gaps
- Usability improvements
5. Share Use Cases
- Blog posts about using the skill
- Video tutorials
- Workshop materials
- Success stories
Getting Started
Fork and Clone
1. Fork the repository on GitHub 2. Clone your fork locally:
git clone https://github.com/yourusername/pypict-claude-skill.git
cd pypict-claude-skill3. Add the upstream repository:
git remote add upstream https://github.com/originalowner/pypict-claude-skill.gitCreate a Branch
Create a descriptive branch name:
git checkout -b feature/add-ecommerce-example
# or
git checkout -b fix/typo-in-readme
# or
git checkout -b docs/improve-installation-guideContribution Guidelines
Code of Conduct
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Help others learn and grow
Quality Standards
For Examples
- Include complete specification/requirements
- Provide clear PICT model
- Generate comprehensive test cases
- Add expected outputs
- Document key learning points
- Follow the existing example structure
For Documentation
- Use clear, concise language
- Include code examples where helpful
- Test all commands and code snippets
- Follow markdown best practices
- Check spelling and grammar
For Skill Improvements
- Maintain backward compatibility when possible
- Add comments explaining complex logic
- Update documentation to reflect changes
- Include examples demonstrating new features
- Test thoroughly before submitting
File Structure
When adding examples:
examples/
├── your-example-name/
│ ├── README.md # Overview and learning points
│ ├── specification.md # Original requirements
│ ├── pict-model.txt # Generated PICT model
│ └── test-plan.md # Complete test plan
└── README.md # Update to list your exampleCommit Messages
Write clear, descriptive commit messages:
# Good
git commit -m "Add e-commerce checkout testing example"
git commit -m "Fix typo in installation instructions"
git commit -m "Improve constraint generation for negative testing"
# Not ideal
git commit -m "Update files"
git commit -m "Fix stuff"
git commit -m "WIP"Pull Request Process
1. Update documentation if you're changing functionality 2. Add tests/examples if you're adding features 3. Update README.md if you're adding examples or major features 4. Ensure quality:
- Check for typos
- Test all examples
- Verify markdown renders correctly
- Ensure links work
5. Submit PR with a clear description:
## Description
Brief description of what this PR does
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Example addition
## Testing
How was this tested?
## Related Issues
Fixes #1236. Respond to feedback promptly and professionally
Example Contribution Workflow
Adding a New Example
1. Create your branch:
git checkout -b example/api-testing2. Add your files to examples/:
mkdir examples/api-testing
# Create your specification, model, and test plan3. Update examples/README.md:
## API Testing Example
Demonstrates PICT testing for REST API endpoints...4. Commit your changes:
git add examples/api-testing/
git add examples/README.md
git commit -m "Add REST API testing example"5. Push to your fork:
git push origin example/api-testing6. Create a Pull Request on GitHub
Fixing Documentation
1. Create your branch:
git checkout -b docs/clarify-installation2. Make your changes
3. Commit and push:
git commit -m "Clarify installation steps for Windows users"
git push origin docs/clarify-installation4. Create a Pull Request
Review Process
1. Automated checks (if configured) will run 2. Maintainer review typically within 1-2 weeks 3. Feedback and iteration may be requested 4. Approval and merge once all criteria met
Recognition
Contributors will be:
- Listed in the repository's contributors
- Mentioned in release notes (for significant contributions)
- Credited in the documentation where appropriate
Questions?
- Open an issue for general questions
- Tag your issue with
question - Be patient - we're all volunteers!
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank You!
Every contribution, no matter how small, helps make this skill better for everyone. We appreciate your time and effort! 🙏
MIT License
Copyright (c) 2025 pypict-claude-skill contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
This project uses and acknowledges the following tools:
PICT (Pairwise Independent Combinatorial Testing)
Copyright (c) Microsoft Corporation
Licensed under the MIT License
https://github.com/microsoft/pict
pypict - Python binding for PICT
Copyright (c) Kenichi Maehashi
Licensed under the MIT License
https://github.com/kmaehashi/pypict
Publishing Guide
This guide will walk you through publishing the pypict-claude-skill repository to GitHub.
Prerequisites
Before you begin, make sure you have:
- [ ] A GitHub account
- [ ] Git installed on your computer
- [ ] The pypict-claude-skill directory on your local machine
Step-by-Step Publishing Process
Step 1: Create a GitHub Repository
1. Go to GitHub.com and log in 2. Click the "+" icon in the top-right corner 3. Select "New repository" 4. Configure your repository:
- Repository name:
pypict-claude-skill - Description: "A Claude skill for designing comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing)"
- Visibility: Public (so others can use it)
- Initialize: DO NOT add README, .gitignore, or license (we already have these)
5. Click "Create repository"
Step 2: Initialize Local Git Repository
Open your terminal and navigate to the pypict-claude-skill directory:
cd /path/to/pypict-claude-skill
# Initialize git repository
git init
# Add all files
git add .
# Create initial commit
git commit -m "Initial commit: PICT Test Designer skill v1.0.0"Step 3: Connect to GitHub
Replace YOUR_USERNAME with your actual GitHub username:
# Add remote repository
git remote add origin https://github.com/YOUR_USERNAME/pypict-claude-skill.git
# Verify remote is set correctly
git remote -vStep 4: Push to GitHub
# Push to main branch (or master if using older git)
git branch -M main
git push -u origin mainStep 5: Verify on GitHub
1. Go to your repository: https://github.com/YOUR_USERNAME/pypict-claude-skill 2. Verify all files are present:
- README.md
- SKILL.md
- LICENSE
- examples/
- .github/
- And all other files
Step 6: Configure Repository Settings
Enable Issues
1. Go to Settings → General 2. Under "Features", ensure "Issues" is checked
Enable Discussions (Optional)
1. Go to Settings → General 2. Under "Features", check "Discussions" 3. This allows users to ask questions and share experiences
Set Up Branch Protection (Optional but Recommended)
1. Go to Settings → Branches 2. Add branch protection rule for main 3. Recommended settings:
- Require pull request reviews before merging
- Require status checks to pass
Step 7: Create a Release
1. Go to your repository on GitHub 2. Click "Releases" (right sidebar) 3. Click "Create a new release" 4. Configure the release:
- Tag:
v1.0.0 - Release title:
v1.0.0 - Initial Release - Description:
## 🎉 Initial Release
First public release of the PICT Test Designer skill for Claude!
### Features
- Complete PICT-based test case generation
- Comprehensive ATM system example
- Installation guides for Claude Code CLI and Desktop
- Full documentation and examples
### Highlights
- Reduces test cases by 99%+ while maintaining coverage
- Easy integration with Claude Code
- Real-world examples included
### Credits
Built on Microsoft PICT and pypict by Kenichi Maehashi5. Click "Publish release"
Step 8: Update README URLs
Now that you know your GitHub username, update the placeholder URLs in README.md:
# Edit README.md and replace all instances of:
# "yourusername" with your actual GitHub username
# For example, change:
# https://github.com/yourusername/pypict-claude-skill
# to:
# https://github.com/YOUR_ACTUAL_USERNAME/pypict-claude-skillThen commit and push:
git add README.md
git commit -m "Update URLs with actual GitHub username"
git push origin mainStep 9: Test the Installation
Test that others can install your skill:
For Claude Code CLI:
claude code config add-skill \
--name pict-test-designer \
--source github \
--repo YOUR_USERNAME/pypict-claude-skillFor Claude Code Desktop:
1. Settings → Skills 2. Add Skill from GitHub 3. URL: https://github.com/YOUR_USERNAME/pypict-claude-skill
Step 10: Share Your Skill!
Now that it's published, share it with:
1. Social Media
- Post on Twitter/X with hashtags #ClaudeAI #Testing #PICT
- Share on LinkedIn
- Post in relevant Reddit communities (r/softwaredevelopment, r/QualityAssurance)
2. Communities
- Claude AI Discord
- Software testing forums
- QA communities
3. Your Team
- Share with colleagues
- Add to team documentation
- Include in onboarding materials
Maintaining Your Repository
When Making Updates
# Make your changes
git add .
git commit -m "Description of changes"
git push origin main
# For new releases
git tag -a v1.1.0 -m "Version 1.1.0"
git push origin v1.1.0Update CHANGELOG.md
Keep track of changes in CHANGELOG.md for each release.
Respond to Issues and PRs
- Check GitHub regularly for new issues
- Review pull requests promptly
- Thank contributors
- Keep discussions friendly and helpful
Promoting Your Skill
1. Add Topics to Your Repository
On GitHub, add relevant topics:
- claude
- claude-ai
- pict
- testing
- test-automation
- combinatorial-testing
- pairwise-testing
- qa
- quality-assurance
2. Create a Blog Post
Write about:
- Why you created this skill
- How it helps with testing
- Real-world use cases
- Tutorial on using it
3. Make a Video Tutorial
Create a quick video showing:
- Installation process
- Basic usage
- The ATM example
- Tips and tricks
4. Submit to Directories
- Add to awesome lists (awesome-claude, awesome-testing)
- Submit to skill directories
- List on your portfolio
Getting Help
If you encounter issues:
1. Check GitHub's documentation 2. Ask in GitHub Discussions (if enabled) 3. Search for similar issues 4. Ask in Claude AI community
Congratulations! 🎉
Your skill is now public and ready to help the community!
Next steps:
- Monitor for issues and feedback
- Plan improvements based on user needs
- Consider adding more examples
- Keep documentation up to date
---
Remember: You're now maintaining an open-source project. Be patient, be kind, and enjoy helping others improve their testing!
Quick Start Guide
Get started with PICT Test Designer in 5 minutes!
Installation (Choose One)
Option 1: Personal Installation (All Projects)
# Clone to your personal skills directory
git clone https://github.com/omkamal/pypict-claude-skill.git ~/.claude/skills/pict-test-designer
# Restart Claude Code - the skill is now available in all projectsOption 2: Project-Specific Installation
# From your project directory
git clone https://github.com/omkamal/pypict-claude-skill.git .claude/skills/pict-test-designer
# Restart Claude Code - the skill is available in this project onlyOption 3: Manual Download
1. Download ZIP from: https://github.com/omkamal/pypict-claude-skill 2. Extract to ~/.claude/skills/pict-test-designer (personal) or .claude/skills/pict-test-designer (project) 3. Restart Claude Code
Your First Test Plan (3 Steps)
Step 1: Start Claude Code
Open your terminal or Claude Code Desktop
Step 2: Describe Your System
Simply tell Claude what you want to test:
I need to test a login function with these requirements:
- Users can login with email and password
- Support for 2FA (enabled/disabled)
- "Remember me" checkbox option
- Rate limiting after 3 failed attempts
Can you design test cases using the pict-test-designer skill?Step 3: Get Your Test Cases!
Claude will automatically: 1. ✅ Analyze your requirements 2. ✅ Identify test parameters and values 3. ✅ Generate a PICT model with constraints 4. ✅ Create optimized test cases 5. ✅ Provide expected outputs
Example Output
You'll receive:
1. PICT Model
Email: Valid, Invalid, Empty
Password: Valid, Invalid, Empty
TwoFactorAuth: Enabled, Disabled
RememberMe: Checked, Unchecked
FailedAttempts: 0, 1, 2, 3
IF [FailedAttempts] = "3" THEN [Email] = "Valid";2. Test Cases Table
| Test # | Password | 2FA | Remember | Failed | Expected Output | |
|---|---|---|---|---|---|---|
| 1 | Valid | Valid | Enabled | Checked | 0 | Success: Login with 2FA prompt |
| 2 | Valid | Invalid | Disabled | Unchecked | 1 | Error: Incorrect password (2 attempts left) |
| ... | ... | ... | ... | ... | ... | ... |
3. Summary
- Total combinations: 432
- PICT test cases: 15
- Reduction: 96.5%
Real-World Examples
Try the ATM Example
Using the pict-test-designer skill, analyze the ATM specification
in examples/atm-specification.md and show me the test coverageThis demonstrates a complex system with:
- 8 parameters
- 25,920 possible combinations
- Only 31 test cases needed!
Common Use Cases
Testing a Web Form
Design test cases for a registration form with:
- Name (required, max 50 chars)
- Email (required, must be valid format)
- Phone (optional, 10 digits)
- Country (dropdown with 5 options)
- Terms checkbox (required)Testing an API Endpoint
I need to test a REST API endpoint that:
- Accepts GET, POST, PUT, DELETE methods
- Requires authentication (valid token, invalid token, missing token)
- Returns JSON, XML, or error
- Has rate limiting
Design test cases.Testing System Configuration
Test our application deployment with:
- Environment: Dev, Staging, Production
- Database: MySQL, PostgreSQL, SQLite
- Cache: Enabled/Disabled
- SSL: Enabled/Disabled
- Log Level: Debug, Info, Error
With the constraint: Production must not use SQLite or Debug loggingTips for Best Results
✅ Do This
- Describe your requirements clearly
- Mention any business rules or constraints
- Specify what different values mean
- Ask for specific output formats if needed
❌ Avoid This
- Too vague: "test my app"
- No context: "make test cases for login"
- Missing constraints: Not mentioning dependencies between parameters
Next Steps
1. Try it with your own system - Start with a simple feature 2. Review the examples - Check out the ATM example 3. Read the full documentation - See SKILL.md 4. Customize for your needs - Adapt parameters and constraints 5. Share your results - Consider contributing examples!
Getting Help
- Questions? Open an issue on GitHub
- Examples? Check the examples directory
- Documentation? Read SKILL.md and README.md
Advanced Usage
Generate More Test Cases
Once you have the PICT model, you can:
1. Use online tools:
- https://pairwise.yuuniworks.com/
- https://pairwise.teremokgames.com/
2. Install PICT locally:
# Windows: Download from GitHub
# https://github.com/microsoft/pict/releases
# Linux/Mac: Use pypict
pip install pypict3. Modify the model:
- Add more parameters
- Change constraints
- Adjust values
- Re-generate test cases
Export to Test Management Tools
The generated test cases can be:
- Copied to Excel/CSV
- Imported to JIRA, TestRail, Azure Test Plans
- Converted to automated test scripts
- Used in documentation
Success Story
"We were testing a configuration-heavy system with hundreds of possible combinations. Using PICT Test Designer, we reduced our test suite from 500+ tests to just 45 tests while maintaining the same coverage. This saved us weeks of testing time!" - QA Team Lead
What's Next?
- Add this skill to your regular testing workflow
- Try it on different types of systems
- Share examples with your team
- Contribute improvements back to the project
Happy Testing! 🚀
PICT Test Designer - Claude Skill
A Claude skill for designing comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing). This skill enables systematic test case design with minimal test cases while maintaining high coverage through pairwise combinatorial testing.
 
🎯 What is PICT?
PICT (Pairwise Independent Combinatorial Testing) is a combinatorial testing tool developed by Microsoft. It generates test cases that efficiently cover all pairwise combinations of parameters while drastically reducing the total number of tests compared to exhaustive testing.
Example: Testing a system with 8 parameters and 3-5 values each:
- Exhaustive testing: 25,920 test cases
- PICT pairwise testing: ~30 test cases (99.88% reduction!)
🚀 Features
- Automated Test Case Generation: Converts requirements into structured PICT models
- Constraint-Based Testing: Applies business rules to eliminate invalid combinations
- Expected Output Generation: Automatically determines expected results for each test case
- Comprehensive Coverage: Ensures all pairwise parameter interactions are tested
- Multiple Domains: Works for software functions, APIs, web forms, configurations, and more
📋 Table of Contents
- Installation
- Prerequisites
- Installing in Claude Code CLI
- Installing in Claude Code Desktop
- Quick Start
- Example: ATM System Testing
- How It Works
- Use Cases
- Credits
- Contributing
- License
🔧 Installation
Prerequisites
- Claude Code CLI or Claude Code Desktop
- (Optional) Python 3.7+ with
pypictfor advanced usage
Installation Methods
Claude Code skills can be installed via the plugin marketplace or manually by placing them in the .claude/skills/ directory.
Method 1: Install via Claude Code Plugin Marketplace (Easiest) 🌟
Install directly through Claude Code's plugin system:
# Add the marketplace
/plugin marketplace add omkamal/pypict-claude-skill
# Install the plugin
/plugin install pict-test-designer@pypict-claude-skillThis automatically installs the skill and keeps it updated. The skill will be available across all your projects.
Method 2: Install from GitHub (Manual)
For Personal Use (All Projects):
# Clone the repository to your personal skills directory
git clone https://github.com/omkamal/pypict-claude-skill.git ~/.claude/skills/pict-test-designer
# Restart Claude Code to load the skill
# The skill will now be available in all your projectsFor Project-Specific Use:
# From your project directory
git clone https://github.com/omkamal/pypict-claude-skill.git .claude/skills/pict-test-designer
# Add to .gitignore if you don't want to commit it
echo ".claude/skills/" >> .gitignore
# Or commit it to share with your team
git add .claude/skills/pict-test-designer
git commit -m "Add PICT test designer skill"Method 3: Install via Git Submodule (Team Sharing)
If you want to share this skill with your team via version control:
# From your project directory
git submodule add https://github.com/omkamal/pypict-claude-skill.git .claude/skills/pict-test-designer
git commit -m "Add PICT test designer skill as submodule"
# Team members clone with:
git clone --recurse-submodules <your-repo-url>
# Or if already cloned:
git submodule update --init --recursiveMethod 4: Download Minimal Package from Releases
Download the pre-packaged minimal installation from GitHub Releases:
# Download the latest minimal package from releases
wget https://github.com/omkamal/pypict-claude-skill/releases/latest/download/pict-test-designer-minimal.zip
# Extract and install for personal use
unzip pict-test-designer-minimal.zip
mv pict-test-designer-minimal ~/.claude/skills/pict-test-designer
# Or for project-specific use
unzip pict-test-designer-minimal.zip
mv pict-test-designer-minimal .claude/skills/pict-test-designerWhat's included: SKILL.md, LICENSE, references/ (syntax and examples) What's excluded: Full examples, helper scripts, extended documentation Size: ~9 KB | Latest Version: See Releases
Method 5: Download Full Repository
1. Download the repository as a ZIP from GitHub 2. Extract to the skills directory:
# For personal use (all projects)
unzip pypict-claude-skill-main.zip
mv pypict-claude-skill-main ~/.claude/skills/pict-test-designer
# For project-specific use
unzip pypict-claude-skill-main.zip
mv pypict-claude-skill-main .claude/skills/pict-test-designerVerify Installation
After installation, restart Claude Code. The skill will load automatically when relevant. You can verify by asking Claude:
Do you have access to the pict-test-designer skill?Or simply start using it:
Design test cases for a login function with username, password, and remember me checkbox.🚀 Quick Start
Once installed, you can use the skill in Claude by simply asking:
Design test cases for a login function with username, password, and remember me checkbox.Claude will: 1. Analyze the requirements 2. Identify parameters and values 3. Generate a PICT model with constraints 4. Create test cases with expected outputs 5. Present results in a formatted table
📊 Example: ATM System Testing
This repository includes a complete real-world example of testing an ATM system. See the examples directory for:
- [ATM Specification](examples/atm-specification.md): Complete ATM system specification with 11 sections covering hardware, software, security, and functional requirements
- [ATM Test Plan](examples/atm-test-plan.md): Comprehensive test plan generated using PICT methodology with 31 test cases (reduced from 25,920 possible combinations)
ATM Example Summary
System Parameters:
- Transaction Types (5): Withdrawal, Deposit, Balance Inquiry, Transfer, PIN Change
- Card Types (3): EMV Chip, Magnetic Stripe, Invalid
- PIN Status (4): Valid, Invalid attempts 1-3
- Account Types (3): Checking, Savings, Both
- Transaction Amounts (4): Within limits, at max, exceeds transaction, exceeds daily
- Cash Availability (3): Sufficient, Insufficient, Empty
- Network Status (3): Primary, Backup, Disconnected
- Card Condition (3): Good, Damaged, Expired
Test Results:
- Total possible combinations: 25,920
- PICT test cases generated: 31
- Reduction: 99.88%
- Coverage: All pairwise (2-way) interactions
- Test execution time: Reduced from weeks to hours
Running the ATM Example
# In Claude Code
Ask: "Use the pict-test-designer skill to analyze the ATM specification
in examples/atm-specification.md and generate test cases"🔍 How It Works
1. Requirements Analysis
Claude analyzes your requirements to identify:
- Parameters: Input variables, configuration options, environmental factors
- Values: Possible values using equivalence partitioning
- Constraints: Business rules and dependencies
- Expected Outcomes: What should happen for different combinations
2. PICT Model Generation
Creates a structured model:
# Parameters
Browser: Chrome, Firefox, Safari
OS: Windows, MacOS, Linux
Memory: 4GB, 8GB, 16GB
# Constraints
IF [OS] = "MacOS" THEN [Browser] <> "IE";
IF [Memory] = "4GB" THEN [OS] <> "MacOS";3. Test Case Generation
Generates minimal test cases covering all pairwise combinations:
| Test # | Browser | OS | Memory | Expected Output |
|---|---|---|---|---|
| 1 | Chrome | Windows | 4GB | Success |
| 2 | Firefox | MacOS | 8GB | Success |
| 3 | Safari | Linux | 16GB | Success |
| ... | ... | ... | ... | ... |
4. Expected Output Determination
For each test case, Claude determines the expected outcome based on:
- Business requirements
- Code logic
- Valid/invalid combinations
🎯 Use Cases
Software Testing
- Function testing with multiple parameters
- API endpoint testing
- Database query testing
- Algorithm validation
Configuration Testing
- System configuration combinations
- Feature flag testing
- Environment setup validation
- Browser compatibility testing
Web Application Testing
- Form validation
- User authentication flows
- E-commerce checkout processes
- Shopping cart functionality
Mobile Testing
- Device and OS combinations
- Screen size and orientation
- Network conditions
- App permissions
Hardware Testing
- Device compatibility
- Interface testing
- Protocol validation
- Performance under different conditions
📚 Documentation
- [SKILL.md](SKILL.md): Complete skill documentation with workflow and best practices
- [PICT Syntax Reference](references/pict_syntax.md): Complete syntax guide (to be created)
- [Examples](references/examples.md): Real-world examples across domains (to be created)
- [Helper Scripts](scripts/pict_helper.py): Python utilities for PICT (to be created)
💡 Tips for Best Results
Good Parameter Names
✅ Use descriptive names: AuthMethod, UserRole, PaymentType ✅ Apply equivalence partitioning: FileSize: Small, Medium, Large ✅ Include boundary values: Age: 0, 17, 18, 65, 66 ✅ Add negative values: Amount: ~-1, 0, 100, ~999999
Writing Constraints
✅ Document rationale: # Safari only available on MacOS ✅ Start simple, add incrementally ✅ Test constraints work as expected
Expected Outputs
✅ Be specific: "Login succeeds, user redirected to dashboard" ❌ Not vague: "Works" or "Success"
🙏 Credits
This skill is built upon the excellent work of:
- [Microsoft PICT](https://github.com/microsoft/pict): The original Pairwise Independent Combinatorial Testing tool developed by Microsoft Research
- [pypict](https://github.com/kmaehashi/pypict): Python binding for PICT by Kenichi Maehashi
- Community Contributors: All contributors who have helped improve PICT tools
About PICT
PICT was developed by Jacek Czerwonka at Microsoft Research. It's a powerful combinatorial testing tool that has been used extensively within Microsoft for testing complex systems with multiple interacting parameters.
References:
- PICT: Pairwise Independent Combinatorial Testing
- Pairwise Testing Methodology
- Combinatorial Test Design
🤝 Contributing
Contributions are welcome! Here's how you can help:
1. Fork the repository 2. Create a feature branch: git checkout -b feature/amazing-feature 3. Make your changes 4. Add examples or documentation 5. Commit your changes: git commit -m 'Add amazing feature' 6. Push to the branch: git push origin feature/amazing-feature 7. Open a Pull Request
Areas for Contribution
- Additional real-world examples
- Enhanced constraint patterns
- Support for more testing domains
- Improved documentation
- Bug fixes and improvements
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
The underlying PICT tool by Microsoft is also licensed under the MIT License.
🔗 Links
- Claude AI: https://claude.ai
- Claude Documentation: https://docs.claude.com
- Microsoft PICT: https://github.com/microsoft/pict
- pypict: https://github.com/kmaehashi/pypict
- Online PICT Tools:
- https://pairwise.yuuniworks.com/
- https://pairwise.teremokgames.com/
📧 Support
If you encounter issues or have questions:
1. Check the examples directory for reference 2. Review the SKILL.md documentation 3. Open an issue on GitHub 4. Join discussions in the Issues section
🌟 Star This Repository
If you find this skill useful, please star the repository to help others discover it!
---
Made with ❤️ for the Claude and testing community
Powered by Microsoft PICT and pypict
{
"description": "Design comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing) for any piece of requirements or code. Analyzes inputs, generates PICT models with parameters, values, and constraints for valid scenarios using pairwise testing. Outputs the PICT model, markdown table of test cases, and expected results.",
"references": {
"files": [
"references/examples.md",
"references/pict_syntax.md",
"CHANGELOG.md",
"CONTRIBUTING.md",
"PUBLISHING.md",
"QUICKSTART.md",
"STRUCTURE.md"
]
},
"content": "This skill enables systematic test case design using PICT (Pairwise Independent Combinatorial Testing). Given requirements or code, it analyzes the system to identify test parameters, generates a PICT model with appropriate constraints, executes the model to generate pairwise test cases, and formats the results with expected outputs.\r\n\r\n\r\nFollow this process for test design:\r\n\r\n### 1. Analyze Requirements or Code\r\n\r\nFrom the user's requirements or code, identify:\r\n- **Parameters**: Input variables, configuration options, environmental factors\r\n- **Values**: Possible values for each parameter (using equivalence partitioning)\r\n- **Constraints**: Business rules, technical limitations, dependencies between parameters\r\n- **Expected Outcomes**: What should happen for different combinations\r\n\r\n**Example Analysis:**\r\n\r\nFor a login function with requirements:\r\n- Users can login with username/password\r\n- Supports 2FA (on/off)\r\n- Remembers login on trusted devices\r\n- Rate limits after 3 failed attempts\r\n\r\nIdentified parameters:\r\n- Credentials: Valid, Invalid\r\n- TwoFactorAuth: Enabled, Disabled\r\n- RememberMe: Checked, Unchecked\r\n- PreviousFailures: 0, 1, 2, 3, 4\r\n\r\n### 2. Generate PICT Model\r\n\r\nCreate a PICT model with:\r\n- Clear parameter names\r\n- Well-defined value sets (using equivalence partitioning and boundary values)\r\n- Constraints for invalid combinations\r\n- Comments explaining business rules\r\n\r\n**Model Structure:**\r\n```\r\nParameterName: Value1, Value2, Value3\r\n\r\nIF [Parameter1] = \"Value\" THEN [Parameter2] <> \"OtherValue\";\r\n```\r\n\r\n**Refer to references/pict_syntax.md for:**\r\n- Complete syntax reference\r\n- Constraint grammar and operators\r\n- Advanced features (sub-models, aliasing, negative testing)\r\n- Command-line options\r\n- Detailed constraint patterns\r\n\r\n**Refer to references/examples.md for:**\r\n- Complete real-world examples by domain\r\n- Software function testing examples\r\n- Web application, API, and mobile testing examples\r\n- Database and configuration testing patterns\r\n- Common patterns for authentication, resource access, error handling\r\n\r\n### 3. Execute PICT Model\r\n\r\nGenerate the PICT model text and format it for the user. You can use Python code directly to work with the model:\r\n\r\n```python\r\nparameters = {\r\n \"OS\": [\"Windows\", \"Linux\", \"MacOS\"],\r\n \"Browser\": [\"Chrome\", \"Firefox\", \"Safari\"],\r\n \"Memory\": [\"4GB\", \"8GB\", \"16GB\"]\r\n}\r\n\r\nconstraints = [\r\n 'IF [OS] = \"MacOS\" THEN [Browser] IN {Safari, Chrome}',\r\n 'IF [Memory] = \"4GB\" THEN [OS] <> \"MacOS\"'\r\n]\r\n\r\nmodel_lines = []\r\nfor param_name, values in parameters.items():\r\n values_str = \", \".join(values)\r\n model_lines.append(f\"{param_name}: {values_str}\")\r\n\r\nif constraints:\r\n model_lines.append(\"\")\r\n for constraint in constraints:\r\n if not constraint.endswith(';'):\r\n constraint += ';'\r\n model_lines.append(constraint)\r\n\r\nmodel_text = \"\\n\".join(model_lines)\r\nprint(model_text)\r\n```\r\n\r\n**Using the helper script (optional):**\r\nThe `scripts/pict_helper.py` script provides utilities for model generation and output formatting:\r\n\r\n```bash\r\npython scripts/pict_helper.py generate config.json\r\n\r\npython scripts/pict_helper.py format output.txt\r\n\r\n\r\n```\r\nParameter1: Value1, Value2, Value3\r\nParameter2: ValueA, ValueB",
"name": "pict-test-designer",
"id": "pypict-claude-skill_omkamal",
"sections": {
"Test Case Summary": "- Total test cases: N\r\n- Coverage: Pairwise (all 2-way combinations)\r\n- Constraints applied: N\r\n````",
"Common Patterns": "### Web Form Testing\r\n\r\n```python\r\nparameters = {\r\n \"Name\": [\"Valid\", \"Empty\", \"TooLong\"],\r\n \"Email\": [\"Valid\", \"Invalid\", \"Empty\"],\r\n \"Password\": [\"Strong\", \"Weak\", \"Empty\"],\r\n \"Terms\": [\"Accepted\", \"NotAccepted\"]\r\n}\r\n\r\nconstraints = [\r\n 'IF [Terms] = \"NotAccepted\" THEN [Name] = \"Valid\"', # Test validation even if terms not accepted\r\n]\r\n```\r\n\r\n### API Endpoint Testing\r\n\r\n```python\r\nparameters = {\r\n \"HTTPMethod\": [\"GET\", \"POST\", \"PUT\", \"DELETE\"],\r\n \"Authentication\": [\"Valid\", \"Invalid\", \"Missing\"],\r\n \"ContentType\": [\"JSON\", \"XML\", \"FormData\"],\r\n \"PayloadSize\": [\"Empty\", \"Small\", \"Large\"]\r\n}\r\n\r\nconstraints = [\r\n 'IF [HTTPMethod] = \"GET\" THEN [PayloadSize] = \"Empty\"',\r\n 'IF [Authentication] = \"Missing\" THEN [HTTPMethod] IN {GET, POST}'\r\n]\r\n```\r\n\r\n### Configuration Testing\r\n\r\n```python\r\nparameters = {\r\n \"Environment\": [\"Dev\", \"Staging\", \"Production\"],\r\n \"CacheEnabled\": [\"True\", \"False\"],\r\n \"LogLevel\": [\"Debug\", \"Info\", \"Error\"],\r\n \"Database\": [\"SQLite\", \"PostgreSQL\", \"MySQL\"]\r\n}\r\n\r\nconstraints = [\r\n 'IF [Environment] = \"Production\" THEN [LogLevel] <> \"Debug\"',\r\n 'IF [Database] = \"SQLite\" THEN [Environment] = \"Dev\"'\r\n]\r\n```",
"Output Format": "Present results in this structure:\r\n\r\n````markdown",
"Troubleshooting": "### No Test Cases Generated\r\n\r\n- Check constraints aren't over-restrictive\r\n- Verify constraint syntax (must end with `;`)\r\n- Ensure parameter names in constraints match definitions (use `[ParameterName]`)\r\n\r\n### Too Many Test Cases\r\n\r\n- Verify using order 2 (pairwise) not higher order\r\n- Consider breaking into sub-models\r\n- Check if parameters can be separated into independent test suites\r\n\r\n### Invalid Combinations in Output\r\n\r\n- Add missing constraints\r\n- Verify constraint logic is correct\r\n- Check if you need to use `NOT` or `<>` operators\r\n\r\n### Script Errors\r\n\r\n- Ensure pypict is installed: `pip install pypict --break-system-packages`\r\n- Check Python version (3.7+)\r\n- Verify model syntax is valid",
"Workflow": "python scripts/pict_helper.py parse output.txt\r\n```\r\n\r\n**To generate actual test cases**, the user can:\r\n1. Save the PICT model to a file (e.g., `model.txt`)\r\n2. Use online PICT tools like:\r\n - https://pairwise.yuuniworks.com/\r\n - https://pairwise.teremokgames.com/\r\n3. Or install PICT locally (see references/pict_syntax.md)\r\n\r\n### 4. Determine Expected Outputs\r\n\r\nFor each generated test case, determine the expected outcome based on:\r\n- Business requirements\r\n- Code logic\r\n- Valid/invalid combinations\r\n\r\nCreate a list of expected outputs corresponding to each test case.\r\n\r\n### 5. Format Complete Test Suite\r\n\r\nProvide the user with:\r\n1. **PICT Model** - The complete model with parameters and constraints\r\n2. **Markdown Table** - Test cases in table format with test numbers\r\n3. **Expected Outputs** - Expected result for each test case",
"Best Practices": "### Parameter Identification\r\n\r\n**Good:**\r\n- Use descriptive names: `AuthMethod`, `UserRole`, `PaymentType`\r\n- Apply equivalence partitioning: `FileSize: Small, Medium, Large` instead of `FileSize: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10`\r\n- Include boundary values: `Age: 0, 17, 18, 65, 66`\r\n- Add negative values for error testing: `Amount: ~-1, 0, 100, ~999999`\r\n\r\n**Avoid:**\r\n- Generic names: `Param1`, `Value1`, `V1`\r\n- Too many values without partitioning\r\n- Missing edge cases\r\n\r\n### Constraint Writing\r\n\r\n**Good:**\r\n- Document rationale: `# Safari only available on MacOS`\r\n- Start simple, add incrementally\r\n- Test constraints work as expected\r\n\r\n**Avoid:**\r\n- Over-constraining (eliminates too many valid combinations)\r\n- Under-constraining (generates invalid test cases)\r\n- Complex nested logic without clear documentation\r\n\r\n### Expected Output Definition\r\n\r\n**Be specific:**\r\n- \"Login succeeds, user redirected to dashboard\"\r\n- \"HTTP 400: Invalid credentials error\"\r\n- \"2FA prompt displayed\"\r\n\r\n**Not vague:**\r\n- \"Works\"\r\n- \"Error\"\r\n- \"Success\"\r\n\r\n### Scalability\r\n\r\nFor large parameter sets:\r\n- Use sub-models to group related parameters with different orders\r\n- Consider separate test suites for unrelated features\r\n- Start with order 2 (pairwise), increase for critical combinations\r\n- Typical pairwise testing reduces test cases by 80-90% vs exhaustive",
"When to Use This Skill": "Use this skill when:\r\n- Designing test cases for a feature, function, or system with multiple input parameters\r\n- Creating test suites for configurations with many combinations\r\n- Needing comprehensive coverage with minimal test cases\r\n- Analyzing requirements to identify test scenarios\r\n- Working with code that has multiple conditional paths\r\n- Building test matrices for API endpoints, web forms, or system configurations",
"Examples": "### Example 1: Simple Function Testing\r\n\r\n**User Request:** \"Design tests for a divide function that takes two numbers and returns the result.\"\r\n\r\n**Analysis:**\r\n- Parameters: dividend (number), divisor (number)\r\n- Values: Using equivalence partitioning and boundaries\r\n - Numbers: negative, zero, positive, large values\r\n- Constraints: Division by zero is invalid\r\n- Expected outputs: Result or error\r\n\r\n**PICT Model:**\r\n```\r\nDividend: -10, 0, 10, 1000\r\nDivisor: ~0, -5, 1, 5, 100\r\n\r\nIF [Divisor] = \"0\" THEN [Dividend] = \"10\";\r\n```\r\n\r\n**Test Cases:**\r\n\r\n| Test # | Dividend | Divisor | Expected Output |\r\n| --- | --- | --- | --- |\r\n| 1 | 10 | 0 | Error: Division by zero |\r\n| 2 | -10 | 1 | -10.0 |\r\n| 3 | 0 | -5 | 0.0 |\r\n| 4 | 1000 | 5 | 200.0 |\r\n| 5 | 10 | 100 | 0.1 |\r\n\r\n### Example 2: E-commerce Checkout\r\n\r\n**User Request:** \"Design tests for checkout flow with payment methods, shipping options, and user types.\"\r\n\r\n**Analysis:**\r\n- Payment: Credit Card, PayPal, Bank Transfer (limited by user type)\r\n- Shipping: Standard, Express, Overnight\r\n- User: Guest, Registered, Premium\r\n- Constraints: Guests can't use Bank Transfer, Premium users get free Express\r\n\r\n**PICT Model:**\r\n```\r\nPaymentMethod: CreditCard, PayPal, BankTransfer\r\nShippingMethod: Standard, Express, Overnight\r\nUserType: Guest, Registered, Premium\r\n\r\nIF [UserType] = \"Guest\" THEN [PaymentMethod] <> \"BankTransfer\";\r\nIF [UserType] = \"Premium\" AND [ShippingMethod] = \"Express\" THEN [PaymentMethod] IN {CreditCard, PayPal};\r\n```\r\n\r\n**Output:** 12-15 test cases covering all valid payment/shipping/user combinations with expected costs and outcomes.",
"PICT Model": "IF [Parameter1] = \"Value1\" THEN [Parameter2] = \"ValueA\";\r\n```",
"Generated Test Cases": "| Test # | Parameter1 | Parameter2 | Expected Output |\r\n| --- | --- | --- | --- |\r\n| 1 | Value1 | ValueA | Success |\r\n| 2 | Value2 | ValueB | Success |\r\n| 3 | Value1 | ValueB | Error: Invalid combination |\r\n...",
"References": "- **references/pict_syntax.md** - Complete PICT syntax reference with grammar and operators\r\n- **references/examples.md** - Comprehensive real-world examples across different domains\r\n- **scripts/pict_helper.py** - Python utilities for model generation and output formatting\r\n- [PICT GitHub Repository](https://github.com/microsoft/pict) - Official PICT documentation\r\n- [pypict Documentation](https://github.com/kmaehashi/pypict) - Python binding documentation\r\n- [Online PICT Tools](https://pairwise.yuuniworks.com/) - Web-based PICT generator"
}
}---
name: pict-test-designer
description: Design comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing) for any piece of requirements or code. Analyzes inputs, generates PICT models with parameters, values, and constraints for valid scenarios using pairwise testing. Outputs the PICT model, markdown table of test cases, and expected results.
---
# PICT Test Designer
This skill enables systematic test case design using PICT (Pairwise Independent Combinatorial Testing). Given requirements or code, it analyzes the system to identify test parameters, generates a PICT model with appropriate constraints, executes the model to generate pairwise test cases, and formats the results with expected outputs.
## When to Use This Skill
Use this skill when:
- Designing test cases for a feature, function, or system with multiple input parameters
- Creating test suites for configurations with many combinations
- Needing comprehensive coverage with minimal test cases
- Analyzing requirements to identify test scenarios
- Working with code that has multiple conditional paths
- Building test matrices for API endpoints, web forms, or system configurations
## Workflow
Follow this process for test design:
### 1. Analyze Requirements or Code
From the user's requirements or code, identify:
- **Parameters**: Input variables, configuration options, environmental factors
- **Values**: Possible values for each parameter (using equivalence partitioning)
- **Constraints**: Business rules, technical limitations, dependencies between parameters
- **Expected Outcomes**: What should happen for different combinations
**Example Analysis:**
For a login function with requirements:
- Users can login with username/password
- Supports 2FA (on/off)
- Remembers login on trusted devices
- Rate limits after 3 failed attempts
Identified parameters:
- Credentials: Valid, Invalid
- TwoFactorAuth: Enabled, Disabled
- RememberMe: Checked, Unchecked
- PreviousFailures: 0, 1, 2, 3, 4
### 2. Generate PICT Model
Create a PICT model with:
- Clear parameter names
- Well-defined value sets (using equivalence partitioning and boundary values)
- Constraints for invalid combinations
- Comments explaining business rules
**Model Structure:**
```
# Parameter definitions
ParameterName: Value1, Value2, Value3
# Constraints (if any)
IF [Parameter1] = "Value" THEN [Parameter2] <> "OtherValue";
```
**Refer to references/pict_syntax.md for:**
- Complete syntax reference
- Constraint grammar and operators
- Advanced features (sub-models, aliasing, negative testing)
- Command-line options
- Detailed constraint patterns
**Refer to references/examples.md for:**
- Complete real-world examples by domain
- Software function testing examples
- Web application, API, and mobile testing examples
- Database and configuration testing patterns
- Common patterns for authentication, resource access, error handling
### 3. Execute PICT Model
Generate the PICT model text and format it for the user. You can use Python code directly to work with the model:
```python
# Define parameters and constraints
parameters = {
"OS": ["Windows", "Linux", "MacOS"],
"Browser": ["Chrome", "Firefox", "Safari"],
"Memory": ["4GB", "8GB", "16GB"]
}
constraints = [
'IF [OS] = "MacOS" THEN [Browser] IN {Safari, Chrome}',
'IF [Memory] = "4GB" THEN [OS] <> "MacOS"'
]
# Generate model text
model_lines = []
for param_name, values in parameters.items():
values_str = ", ".join(values)
model_lines.append(f"{param_name}: {values_str}")
if constraints:
model_lines.append("")
for constraint in constraints:
if not constraint.endswith(';'):
constraint += ';'
model_lines.append(constraint)
model_text = "\n".join(model_lines)
print(model_text)
```
**Using the helper script (optional):**
The `scripts/pict_helper.py` script provides utilities for model generation and output formatting:
```bash
# Generate model from JSON config
python scripts/pict_helper.py generate config.json
# Format PICT tool output as markdown table
python scripts/pict_helper.py format output.txt
# Parse PICT output to JSON
python scripts/pict_helper.py parse output.txt
```
**To generate actual test cases**, the user can:
1. Save the PICT model to a file (e.g., `model.txt`)
2. Use online PICT tools like:
- https://pairwise.yuuniworks.com/
- https://pairwise.teremokgames.com/
3. Or install PICT locally (see references/pict_syntax.md)
### 4. Determine Expected Outputs
For each generated test case, determine the expected outcome based on:
- Business requirements
- Code logic
- Valid/invalid combinations
Create a list of expected outputs corresponding to each test case.
### 5. Format Complete Test Suite
Provide the user with:
1. **PICT Model** - The complete model with parameters and constraints
2. **Markdown Table** - Test cases in table format with test numbers
3. **Expected Outputs** - Expected result for each test case
## Output Format
Present results in this structure:
````markdown
## PICT Model
```
# Parameters
Parameter1: Value1, Value2, Value3
Parameter2: ValueA, ValueB
# Constraints
IF [Parameter1] = "Value1" THEN [Parameter2] = "ValueA";
```
## Generated Test Cases
| Test # | Parameter1 | Parameter2 | Expected Output |
| --- | --- | --- | --- |
| 1 | Value1 | ValueA | Success |
| 2 | Value2 | ValueB | Success |
| 3 | Value1 | ValueB | Error: Invalid combination |
...
## Test Case Summary
- Total test cases: N
- Coverage: Pairwise (all 2-way combinations)
- Constraints applied: N
````
## Best Practices
### Parameter Identification
**Good:**
- Use descriptive names: `AuthMethod`, `UserRole`, `PaymentType`
- Apply equivalence partitioning: `FileSize: Small, Medium, Large` instead of `FileSize: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10`
- Include boundary values: `Age: 0, 17, 18, 65, 66`
- Add negative values for error testing: `Amount: ~-1, 0, 100, ~999999`
**Avoid:**
- Generic names: `Param1`, `Value1`, `V1`
- Too many values without partitioning
- Missing edge cases
### Constraint Writing
**Good:**
- Document rationale: `# Safari only available on MacOS`
- Start simple, add incrementally
- Test constraints work as expected
**Avoid:**
- Over-constraining (eliminates too many valid combinations)
- Under-constraining (generates invalid test cases)
- Complex nested logic without clear documentation
### Expected Output Definition
**Be specific:**
- "Login succeeds, user redirected to dashboard"
- "HTTP 400: Invalid credentials error"
- "2FA prompt displayed"
**Not vague:**
- "Works"
- "Error"
- "Success"
### Scalability
For large parameter sets:
- Use sub-models to group related parameters with different orders
- Consider separate test suites for unrelated features
- Start with order 2 (pairwise), increase for critical combinations
- Typical pairwise testing reduces test cases by 80-90% vs exhaustive
## Common Patterns
### Web Form Testing
```python
parameters = {
"Name": ["Valid", "Empty", "TooLong"],
"Email": ["Valid", "Invalid", "Empty"],
"Password": ["Strong", "Weak", "Empty"],
"Terms": ["Accepted", "NotAccepted"]
}
constraints = [
'IF [Terms] = "NotAccepted" THEN [Name] = "Valid"', # Test validation even if terms not accepted
]
```
### API Endpoint Testing
```python
parameters = {
"HTTPMethod": ["GET", "POST", "PUT", "DELETE"],
"Authentication": ["Valid", "Invalid", "Missing"],
"ContentType": ["JSON", "XML", "FormData"],
"PayloadSize": ["Empty", "Small", "Large"]
}
constraints = [
'IF [HTTPMethod] = "GET" THEN [PayloadSize] = "Empty"',
'IF [Authentication] = "Missing" THEN [HTTPMethod] IN {GET, POST}'
]
```
### Configuration Testing
```python
parameters = {
"Environment": ["Dev", "Staging", "Production"],
"CacheEnabled": ["True", "False"],
"LogLevel": ["Debug", "Info", "Error"],
"Database": ["SQLite", "PostgreSQL", "MySQL"]
}
constraints = [
'IF [Environment] = "Production" THEN [LogLevel] <> "Debug"',
'IF [Database] = "SQLite" THEN [Environment] = "Dev"'
]
```
## Troubleshooting
### No Test Cases Generated
- Check constraints aren't over-restrictive
- Verify constraint syntax (must end with `;`)
- Ensure parameter names in constraints match definitions (use `[ParameterName]`)
### Too Many Test Cases
- Verify using order 2 (pairwise) not higher order
- Consider breaking into sub-models
- Check if parameters can be separated into independent test suites
### Invalid Combinations in Output
- Add missing constraints
- Verify constraint logic is correct
- Check if you need to use `NOT` or `<>` operators
### Script Errors
- Ensure pypict is installed: `pip install pypict --break-system-packages`
- Check Python version (3.7+)
- Verify model syntax is valid
## References
- **references/pict_syntax.md** - Complete PICT syntax reference with grammar and operators
- **references/examples.md** - Comprehensive real-world examples across different domains
- **scripts/pict_helper.py** - Python utilities for model generation and output formatting
- [PICT GitHub Repository](https://github.com/microsoft/pict) - Official PICT documentation
- [pypict Documentation](https://github.com/kmaehashi/pypict) - Python binding documentation
- [Online PICT Tools](https://pairwise.yuuniworks.com/) - Web-based PICT generator
## Examples
### Example 1: Simple Function Testing
**User Request:** "Design tests for a divide function that takes two numbers and returns the result."
**Analysis:**
- Parameters: dividend (number), divisor (number)
- Values: Using equivalence partitioning and boundaries
- Numbers: negative, zero, positive, large values
- Constraints: Division by zero is invalid
- Expected outputs: Result or error
**PICT Model:**
```
Dividend: -10, 0, 10, 1000
Divisor: ~0, -5, 1, 5, 100
IF [Divisor] = "0" THEN [Dividend] = "10";
```
**Test Cases:**
| Test # | Dividend | Divisor | Expected Output |
| --- | --- | --- | --- |
| 1 | 10 | 0 | Error: Division by zero |
| 2 | -10 | 1 | -10.0 |
| 3 | 0 | -5 | 0.0 |
| 4 | 1000 | 5 | 200.0 |
| 5 | 10 | 100 | 0.1 |
### Example 2: E-commerce Checkout
**User Request:** "Design tests for checkout flow with payment methods, shipping options, and user types."
**Analysis:**
- Payment: Credit Card, PayPal, Bank Transfer (limited by user type)
- Shipping: Standard, Express, Overnight
- User: Guest, Registered, Premium
- Constraints: Guests can't use Bank Transfer, Premium users get free Express
**PICT Model:**
```
PaymentMethod: CreditCard, PayPal, BankTransfer
ShippingMethod: Standard, Express, Overnight
UserType: Guest, Registered, Premium
IF [UserType] = "Guest" THEN [PaymentMethod] <> "BankTransfer";
IF [UserType] = "Premium" AND [ShippingMethod] = "Express" THEN [PaymentMethod] IN {CreditCard, PayPal};
```
**Output:** 12-15 test cases covering all valid payment/shipping/user combinations with expected costs and outcomes.
Repository Structure
Complete file structure of the pypict-claude-skill repository.
pypict-claude-skill/
├── .github/ # GitHub configuration
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ │ ├── bug_report.md # Bug report template
│ │ └── feature_request.md # Feature request template
│ ├── workflows/ # GitHub Actions
│ │ └── ci.yml # CI workflow for validation
│ ├── markdown-link-check-config.json # Link checker config
│ └── pull_request_template.md # PR template
│
├── examples/ # Real-world examples
│ ├── README.md # Examples overview
│ ├── atm-specification.md # ATM system specification
│ └── atm-test-plan.md # Complete ATM test plan (31 test cases)
│
├── references/ # Reference documentation
│ ├── pict_syntax.md # PICT syntax reference (placeholder)
│ └── examples.md # PICT examples reference (placeholder)
│
├── scripts/ # Helper scripts
│ ├── README.md # Scripts documentation
│ └── pict_helper.py # Python utilities for PICT
│
├── .gitignore # Git ignore rules
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # MIT License with attributions
├── PUBLISHING.md # Guide to publish on GitHub
├── QUICKSTART.md # Quick start guide
├── README.md # Main documentation
└── SKILL.md # Skill definition for Claude
File Descriptions
Root Directory
| File | Purpose | Status |
|---|---|---|
| README.md | Main repository documentation with installation and usage | ✅ Complete |
| SKILL.md | Claude skill definition with workflow and best practices | ✅ Complete |
| LICENSE | MIT License with proper attribution to PICT and pypict | ✅ Complete |
| CONTRIBUTING.md | Guidelines for contributing to the project | ✅ Complete |
| CHANGELOG.md | Version history and release notes | ✅ Complete |
| QUICKSTART.md | Quick start guide for new users | ✅ Complete |
| PUBLISHING.md | Step-by-step guide to publish repository | ✅ Complete |
| .gitignore | Git ignore patterns for Python and temp files | ✅ Complete |
.github/ Directory
| File | Purpose | Status |
|---|---|---|
| workflows/ci.yml | GitHub Actions workflow for CI/CD | ✅ Complete |
| ISSUE_TEMPLATE/bug_report.md | Template for bug reports | ✅ Complete |
| ISSUE_TEMPLATE/feature_request.md | Template for feature requests | ✅ Complete |
| pull_request_template.md | Template for pull requests | ✅ Complete |
| markdown-link-check-config.json | Configuration for link checking | ✅ Complete |
examples/ Directory
| File | Purpose | Status |
|---|---|---|
| README.md | Overview of available examples | ✅ Complete |
| atm-specification.md | Complete ATM system specification (11 sections) | ✅ Complete |
| atm-test-plan.md | Full test plan with PICT model and 31 test cases | ✅ Complete |
references/ Directory
| File | Purpose | Status |
|---|---|---|
| pict_syntax.md | PICT syntax reference and grammar | 🚧 Placeholder |
| examples.md | Collection of PICT examples by domain | 🚧 Placeholder |
scripts/ Directory
| File | Purpose | Status |
|---|---|---|
| README.md | Scripts documentation | ✅ Complete |
| pict_helper.py | Python utilities for PICT (generate, format, parse) | 🚧 Basic implementation |
Key Features by File
README.md
- Installation instructions for Claude Code CLI and Desktop
- Quick start guide
- ATM example summary
- Credits to Microsoft PICT and pypict
- Links to documentation and resources
SKILL.md
- Complete workflow for using the skill
- Parameter identification guidelines
- PICT model generation process
- Constraint writing best practices
- Expected output determination
- Common patterns and examples
examples/atm-test-plan.md
- Complete PICT model with 8 parameters
- 16 business rule constraints
- 31 optimized test cases (from 25,920 combinations)
- Coverage analysis
- Test execution guidelines
- Risk-based prioritization
- Traceability matrix
PUBLISHING.md
- Step-by-step GitHub publishing guide
- Repository configuration instructions
- Release creation process
- Promotion strategies
- Maintenance guidelines
CONTRIBUTING.md
- Contribution types and guidelines
- File structure for examples
- Commit message conventions
- Pull request process
- Quality standards
File Statistics
- Total Files: 18
- Markdown Documentation: 14 files
- Python Scripts: 1 file
- Configuration Files: 3 files
- Complete Files: 15 (83%)
- Placeholder Files: 2 (11%)
- Basic Implementation: 1 (6%)
Documentation Coverage
| Category | Coverage |
|---|---|
| Installation | ✅ Complete |
| Quick Start | ✅ Complete |
| Examples | ✅ 1 complete (ATM), more planned |
| API/Reference | 🚧 Placeholders (to be completed) |
| Contributing | ✅ Complete |
| Publishing | ✅ Complete |
Next Steps for Repository
Short Term (v1.1)
1. Complete references/pict_syntax.md with full PICT syntax 2. Add more examples to references/examples.md 3. Enhance pict_helper.py with full pypict integration 4. Add more real-world examples
Medium Term (v1.2-1.3)
1. E-commerce checkout example 2. API testing example 3. Mobile app configuration example 4. Integration with test management tools
Long Term (v2.0+)
1. Advanced constraint patterns library 2. Automated test case generation from code 3. CI/CD integration examples 4. Performance testing templates
Contributing to Structure
When adding new files:
1. Examples: Add to examples/ with specification and test plan 2. Documentation: Add to root or references/ as appropriate 3. Scripts: Add to scripts/ with README update 4. Templates: Add to .github/ISSUE_TEMPLATE/ or .github/
Maintenance Checklist
- [ ] Keep CHANGELOG.md updated
- [ ] Update README.md with new features
- [ ] Add new examples to examples/README.md
- [ ] Update file counts in this document
- [ ] Maintain links in all markdown files
- [ ] Test all code examples and commands
- [ ] Keep license attributions current
---
Repository Status: ✅ Ready for Publishing
Last Updated: October 19, 2025
Version: 1.0.0