property-based-testing

Generates and reviews property-based tests across multiple languages and smart contracts.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/tottenjordan/me-skittles --skill property-based-testing-tottenjordan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: property-based-testing
Source: https://github.com/tottenjordan/me-skittles/tree/main/gemini/property-based-testing/skills/property-based-testing
Command: npx skills add https://github.com/tottenjordan/me-skittles --skill property-based-testing-tottenjordan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Example-based tests only cover the cases you think of, leaving edge cases and subtle bugs undetected. This Skill helps you write property-based tests that verify algebraic properties like roundtrips, idempotence, and invariants across thousands of generated inputs. ## Core Features & Use Cases - Automatic PBT Detection: Recognizes serialization pairs, validators, normalizers, pure functions, and smart contract invariants where property-based testing provides stronger coverage than example tests. - Test Generation and Review: Creates complete property-based tests with strategies, edge cases, and settings, and reviews existing tests for tautologies, vacuous assumptions, and weak assertions. - Multi-Language Support: Covers Hypothesis (Python), fast-check (JavaScript/TypeScript), proptest (Rust), rapid (Go), jqwik (Java), and Echidna/Medusa for Solidity smart contracts. - Use Case: You have an encode_message/decode_message pair. The Skill detects the serialization pattern and generates a roundtrip property test with realistic input strategies and explicit edge-case examples. ## Quick Start Ask the agent to write property-based tests for your serialization or validation function using the appropriate library for your language.

Frequently Asked Questions about property-based-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write property-based tests in Python?▼

Use the Hypothesis library with the @given decorator and strategies from hypothesis.strategies to generate inputs. Define properties like roundtrip (decode(encode(x)) == x) or idempotence (f(f(x)) == f(x)) rather than asserting specific example outputs.

What is the difference between property-based testing and example-based testing?▼

Example-based tests check specific hand-picked inputs and outputs, while property-based tests verify general properties across hundreds of generated inputs. Property-based testing excels at finding edge cases in serialization, parsing, and normalization code that examples typically miss.

Hypothesis vs fast-check vs proptest: which PBT library should I use?▼

The choice depends on your language: Hypothesis for Python, fast-check for JavaScript/TypeScript, proptest for Rust, rapid for Go, and jqwik for Java. All provide input generation and shrinking to minimal counterexamples.

Can property-based testing be used for Solidity smart contracts?▼

Yes, Echidna and Medusa are property-based fuzzers for EVM contracts that test state invariants. You define functions like echidna_balance_invariant that must always return true, and the fuzzer attempts to violate them.

When should I not use property-based testing?▼

Avoid PBT for simple CRUD operations without transformation logic, UI code, integration tests with heavy external setup, and code with unavoidable side effects like network calls. It works best for pure functions and unit-level testing.

Why do my property-based tests pass vacuously or test nothing?▼

Vacuous tests usually come from contradictory or overly narrow assume() calls that filter out nearly all inputs. Tautological tests happen when the assertion reimplements the function logic, such as assert add(a, b) == a + b; use algebraic properties like commutativity instead.