Files
davila7--claude-code-templates/dashboard/public/component-content/commands/testing/add-property-based-testing.json
T
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 line
2.4 KiB
JSON

{"content": "---\nallowed-tools: Read, Write, Edit, Bash\nargument-hint: [language] | --javascript | --python | --java | --haskell | --rust | --clojure\ndescription: Implement property-based testing with framework selection and invariant identification\n---\n\n# Add Property-Based Testing\n\nImplement property-based testing framework with invariant analysis and test generation: **$ARGUMENTS**\n\n## Current Testing Context\n\n- Language: !`find . -name \"*.js\" -o -name \"*.ts\" | head -1 >/dev/null && echo \"JavaScript/TypeScript\" || find . -name \"*.py\" | head -1 >/dev/null && echo \"Python\" || echo \"Multi-language\"`\n- Test framework: !`find . -name \"jest.config.*\" -o -name \"pytest.ini\" | head -1 || echo \"Detect framework\"`\n- Mathematical functions: Analysis of codebase for property-testable functions\n- Business logic: Identification of invariants and properties in domain logic\n\n## Task\n\nImplement comprehensive property-based testing with invariant analysis and automated test generation:\n\n**Language Focus**: Use $ARGUMENTS to specify JavaScript, Python, Java, Haskell, Rust, Clojure, or auto-detect from codebase\n\n**Property-Based Testing Framework**:\n\n1. **Framework Selection** - Choose appropriate tool (fast-check, Hypothesis, QuickCheck, proptest), install dependencies, configure integration\n2. **Property Identification** - Analyze mathematical properties, identify business invariants, discover symmetries, evaluate round-trip properties\n3. **Generator Design** - Create custom data generators, implement constraint-based generation, design composite generators, optimize generation strategies\n4. **Property Implementation** - Write property tests, implement preconditions, design postconditions, create invariant checks\n5. **Shrinking Configuration** - Configure test case shrinking, optimize failure minimization, implement custom shrinkers, enhance debugging\n6. **Integration & Reporting** - Integrate with existing test suite, configure reporting, setup CI integration, optimize execution performance\n\n**Advanced Features**: Stateful property testing, model-based testing, custom generators, parallel property execution, performance property testing.\n\n**Quality Assurance**: Property completeness analysis, edge case coverage, performance optimization, maintainability assessment.\n\n**Output**: Complete property-based testing setup with identified properties, custom generators, integrated test suite, and performance optimization.\n"}