property-based-testing

Detect patterns and generate property-based tests across Python, JavaScript, Rust, Go, Java, Scala, and Solidity.

Updated Jul 10, 2025
One-click install
npx skills add https://github.com/Superlend/superloop-core-contracts --skill property-based-testing-superlend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: property-based-testing
Source: https://github.com/Superlend/superloop-core-contracts/tree/main/.cursor/skills/property-based-testing/skills/property-based-testing
Command: npx skills add https://github.com/Superlend/superloop-core-contracts --skill property-based-testing-superlend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps developers apply property-based testing across multiple languages and smart contracts. It provides patterns, strategies, and workflow guidance to design tests that reveal edge cases early and reduce brittle example-based tests.

Core Features & Use Cases

  • Pattern detection for serialization, normalization, validators, and smart-contract invariants.
  • Test generation of property-based tests using language-specific libraries (e.g., Hypothesis, fast-check, proptest, Echidna, Medusa).
  • Design guidance with Property-Driven Development, strategies, and review checklists to improve test quality and coverage.
  • Use Case: When starting a new feature, use properties to specify expected behavior before implementation, ensuring robust automation and risk assessment.

Quick Start

Inspect a target codebase to identify where property-based testing can add value, then draft an initial property-based test using a library of your choice. Use the Reference materials in the skill to guide strategy selection, and iterate on your properties as you implement the feature.

Frequently Asked Questions about property-based-testing

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

FAQPage Schema
How do I generate property-based tests for smart contracts using Echidna or Medusa?

You can generate property-based tests for smart contracts by detecting invariants and applying strategies with Echidna or Medusa to reveal edge cases in Solidity and Vyper contexts.

What is property-based testing and when should I use it over example-based tests?

Property-based testing specifies expected behavior properties to generate inputs automatically, replacing brittle example-based tests by revealing edge cases early and improving test coverage.

Can I use Hypothesis and fast-check to detect serialization and validator patterns?

Yes, you can use Hypothesis for Python and fast-check for JavaScript to detect serialization, normalization, and validator patterns, then generate property-based tests for those workflows.

What's the best way to start property-driven development for a new feature?

The best way to start property-driven development is to inspect a target codebase for value, draft initial properties using your chosen library, and iterate using design guidance and review checklists.

Does property-based testing work with Rust proptest and Go testing frameworks?

Yes, property-based testing works across Rust using proptest and Go contexts, leveraging standard libraries and curated strategies to enable effective adoption and risk assessment.

Why do brittle example-based tests fail to catch edge cases in software testing?

Brittle example-based tests fail because they manually specify inputs, whereas property-based testing automatically generates inputs to validate properties and expose hidden edge cases.