Property Based Testing
Property-based testing skill that checks code invariants against automatically generated inputs across Python, JavaScript, and Java.
- CCM score
- 40 of 100
- skills.sh installs
- 458
- GitHub stars
- 396
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers when to use property tests, including algorithms, invariants, parsers, round-trip encoding, and sorting or data structure operations
- Includes a Python Hypothesis quick start with round-trip, length, and first-to-last properties, plus reference guides for fast-check and junit-quickcheck
- Guides users toward shrinking failures to minimal cases, combining properties with known example tests, and avoiding tautologies
- Designed for developers who want to surface edge cases that example-based tests tend to miss
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill property-based-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Property-Based Testing
Table of Contents
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:
# test_string_operations.py
import pytest
from hypothesis import given, strategies as st, assume, example
def reverse_string(s: str) -> str:
"""Reverse a string."""
return s[::-1]
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Category
- Testing & QA
- First seen
- Jun 3, 2026
Questions
What does the property-based-testing skill do?
It designs property-based tests that check code properties hold for all inputs using automatic test case generation. It is aimed at algorithms, invariants, parsers, serializers and data transformations rather than specific examples.
How do I install the property-based-testing skill?
Run npx -y skills add aj-geddes/useful-ai-prompts --skill property-based-testing -y in your project. Once installed, the agent can write property-based tests with Hypothesis, fast-check or junit-quickcheck.
Which languages and libraries does property-based-testing support?
The skill includes reference guides for Hypothesis in Python, fast-check in JavaScript and TypeScript, and junit-quickcheck in Java. Each guide covers how to write generative tests in that language.
Where does property-based-testing sit in the Testing and QA category?
It is listed in the Testing and QA category alongside tdd, webapp-testing and break-ui. It differs from those by focusing on general properties and automatically generated inputs instead of hand-written examples.
More from aj-geddes/useful-ai-prompts
All 258- Cpu Profiling457
- Frontend Routing457
- Load Balancer Setup457
- Aws Rds Database456
- Log Aggregation456
- Documentation Site Setup455
- Recommendation System455
- Retrospective Facilitation455
- Survival Analysis454
- Git Hooks Setup453
- Monorepo Management453
- Secrets Management453
- Api Filtering Sorting452
- Cloud Migration Planning452
- Cloud Storage Optimization452
- Configuration Management452
- Correlation Analysis452
- Design Handoff452
- Performance Regression Debugging452
- Alert Management450
- Cloud Cost Management450
- Network Security Groups450
- Troubleshooting Guide450
- Vue Application Structure450
Similar to Property Based Testing
More Testing & QAmutation-testingaj-geddes/useful-ai-prompts481 installsEvaluate test suite quality by injecting code mutations and checking that tests catch them.
unit-testing-frameworkaj-geddes/useful-ai-prompts637 installsStructured guidance for writing unit tests with Jest, pytest, JUnit, or RSpec, following the AAA pattern.
testingmindrally/skills898 installsGeneral testing guidance covering isolation, data setup, coverage, and assertion clarity across frameworks and languages.
python-testingmindrally/skills1.2K installsPytest-focused testing guidance covering unit, integration, property-based, and mocking practices for Python.
javascript-testing-expertdubzzz/fast-check312 installsTesting guide for JavaScript functions and components that favors property-based tests with fast-check and controls nondeterminism.
test-anti-patternsdotnet/skills6.3K installsAudits test suites in any language for anti-patterns, producing a severity-ranked report of false-confidence and maintainability issues.