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
- 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-skill
This 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 projects
For 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 --recursive
Method 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-designer
What'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
- Download the repository as a ZIP from GitHub
- 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-designer
Verify 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:
- Analyze the requirements
- Identify parameters and values
- Generate a PICT model with constraints
- Create test cases with expected outputs
- 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: Complete ATM system specification with 11 sections covering hardware, software, security, and functional requirements
- ATM Test Plan: 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: Complete skill documentation with workflow and best practices
- PICT Syntax Reference: Complete syntax guide (to be created)
- Examples: Real-world examples across domains (to be created)
- Helper Scripts: 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: The original Pairwise Independent Combinatorial Testing tool developed by Microsoft Research
- 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:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Add examples or documentation
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - 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:
š§ Support
If you encounter issues or have questions:
- Check the examples directory for reference
- Review the SKILL.md documentation
- Open an issue on GitHub
- 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