Agent skill · data analytics · aj-geddes
property-based-testing
Design property-based tests that verify code properties hold for all inputs using automatic test case generation. Use for property-based, QuickCheck, hypothesis testing, generative testing, and invariant verification.
Why this skill is useful
Provides domain-specific knowledge on property-based testing frameworks and techniques that the AI wouldn't reliably generate on its own.
What it needs
Requires hypothesis, pytest installed locally. About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.
What this skill does
Property-Based Testing Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Property-based testing verifies that code satisfies general properties or invariants for a wide range of automatically generated inputs, rather than testing specific examples. This approach finds edge cases and bugs that example-based tests often miss. When to Use Testing algorithms with mathematical properties Verifying invariants that should always hold Finding edge cases automatically Testing parsers and serializers (round-trip properties) Validating data transformations Testing sorting, searching, and data structure operations Discovering unexpected input combinations Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Hypothesis for Python Hypothesis for Python fast-check for JavaScript/TypeScript fast-check for JavaScript/TypeScript junit-quickcheck for Java junit-quickcheck for Java Best Practices ✅ DO Focus on general properties, not specific cases Test mathematical properties (commutativity, associativity) Verify round-trip encoding/decoding Use shrinking to find minimal failing cases Combine with example-based tests for known edge cases Test invariants that should always hold Generate realistic input distributions ❌ DON'T Test properties that are tautologies Over-constrain input generation Ignore shrunk test failures Replace all example tests with properties Test implementation details Generate invalid inputs without constraints Forget to handle edge cases in generators
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aj-geddes/property-based-testing