Awesome Reviewers checks + prompts

Property-based tests

Generates inputs and checks invariants that must hold for all of them, then shrinks failures to a minimal case.

V1021 technique
tactic Testing
23 of 256 scanned repositories run it (9%)

Sub-techniques

3

IDNameDescription
V1021.001Round-trip propertiesdecode(encode(x)) == x for serializers and parsers.
V1021.002Model-based propertiesCompare the implementation against a simple reference model.
V1021.003Stateful testingGenerate sequences of operations and check invariants after each.

Craft it

  1. Start with round-trip and idempotence properties; they need no oracle.
  2. Persist the failure database so found cases are replayed.
  3. Promote shrunk failures to example tests.

Reverse engineer it

Signs that a codebase already runs this technique, and where to read how it is configured.

  • @given decorators, fc.assert or proptest! macros in tests.
  • .hypothesis/ in .gitignore.

Where the scanned repositories configure it:

  • Cargo.toml in 11 repositories
  • pyproject.toml in 10 repositories
  • package.json in 3 repositories

Detected by the scanner as: Property-based tests (edge-case inputs nobody wrote a test for; invariants over generated data.)

Open-source packages

3

Tools seen in scans

by repositories that run them

ToolReposCommand seenRuns inDocs
proptest 11 docs
hypothesis 10 docs
fast-check 3 docs

Procedure examples

repositories that run it, most-starred first

RepositoryToolsRuns inEvidence
langgenius/dify hypothesis api/pyproject.toml [dependency-groups] dev: hypothesis
langflow-ai/langflow hypothesis pyproject.toml [dependency-groups] dev: hypothesis
denoland/deno proptest Cargo.toml [workspace.dependencies]: proptest
pytorch/pytorch hypothesis pyproject.toml [dependency-groups] dev: hypothesis
infiniflow/ragflow hypothesis pyproject.toml [dependency-groups] test: hypothesis
zed-industries/zed proptest Cargo.toml [workspace.dependencies]: proptest
nuxt/nuxt fast-check package.json devDependencies: fast-check
apache/spark hypothesis pyproject.toml [dependency-groups] internal_test: hypothesis
astral-sh/ruff proptest Cargo.toml [workspace.dependencies]: quickcheck
helix-editor/helix proptest Cargo.toml [workspace.dependencies]: quickcheck
pola-rs/polars proptest Cargo.toml [workspace.dependencies]: proptest
diegosouzapw/OmniRoute fast-check package.json devDependencies: fast-check
servo/servo proptest Cargo.toml [workspace.dependencies]: quickcheck
influxdata/influxdb proptest Cargo.toml [workspace.dependencies]: proptest
tokio-rs/tokio proptest tokio/Cargo.toml [target.'cfg(not(target_family = "wasm"))'.dev-dependencies]...
PostHog/posthog hypothesis pyproject.toml [dependency-groups] dev: hypothesis
BerriAI/litellm hypothesis, proptest pyproject.toml [dependency-groups] dev: hypothesis
pydantic/pydantic hypothesis pydantic-core/pyproject.toml [dependency-groups] testing-extra: hypothesis
tokio-rs/axum proptest axum/Cargo.toml [dev-dependencies]: quickcheck
jj-vcs/jj proptest Cargo.toml [workspace.dependencies]: proptest
bytedance/deer-flow hypothesis backend/pyproject.toml [dependency-groups] dev: hypothesis
langfuse/langfuse fast-check worker/package.json devDependencies: fast-check
anthropics/anthropic-sdk-python hypothesis pyproject.toml [dependency-groups] dev: hypothesis