All skills
Skillintermediate

PBT Libraries by Language

| Language | Library | Import/Setup | |----------|---------|--------------| | Python | Hypothesis | `from hypothesis import given, strategies as st` | | JavaScript/TypeScript | fast-check | `import fc from 'fast-check'` | | Rust | proptest | `use proptest::prelude::*` | | Go | rapid | `import "pgregory.net/rapid"` | | Java | jqwik | `@Property` annotations, `import net.jqwik.api.*` | | Scala | Sca

Claude Code Knowledge Pack7/10/2026

Overview

PBT Libraries by Language

Quick Reference

LanguageLibraryImport/Setup
PythonHypothesisfrom hypothesis import given, strategies as st
JavaScript/TypeScriptfast-checkimport fc from 'fast-check'
Rustproptestuse proptest::prelude::*
Gorapidimport "pgregory.net/rapid"
Javajqwik@Property annotations, import net.jqwik.api.*
ScalaScalaCheckimport org.scalacheck._
C#FsCheckusing FsCheck; using FsCheck.Xunit;
ElixirStreamDatause ExUnitProperties
HaskellQuickCheckimport Test.QuickCheck
Clojuretest.check[clojure.test.check :as tc]
RubyPropCheckrequire 'prop_check'
KotlinKotestio.kotest.property.*
SwiftSwiftCheckimport SwiftCheck ⚠️ unmaintained
C++RapidCheck#include <rapidcheck.h>

Alternatives

LanguageAlternativeNotes
HaskellHedgehogIntegrated shrinking, no type classes
RustquickcheckSimpler API, per-type shrinking
GogopterScalaCheck-style, more explicit

Smart Contract Testing (EVM/Solidity)

ToolTypeDescription
EchidnaFuzzerProperty-based fuzzer for EVM contracts
MedusaFuzzerNext-gen fuzzer with parallel execution
// Echidna property example
function echidna_balance_invariant() public returns (bool) {
    return address(this).balance >= 0;
}

Installation:

# Echidna (via crytic toolchain)
pip install crytic-compile
# Download binary from https://github.com/crytic/echidna

# Medusa
go install github.com/crytic/medusa@latest

See secure-contracts.com for tutorials.

Installation

Python:

pip install hypothesis

JavaScript/TypeScript:

npm install fast-check

Rust (add to Cargo.toml):

[dev-dependencies]
proptest = "1.0"
# or for quickcheck:
quickcheck = "1.0"

Go:

go get pgregory.net/rapid
# or for gopter:
go get github.com/leanovate/gopter

Java (Maven):

<dependency>
  <groupId>net.jqwik</groupId>
  <artifactId>jqwik</artifactId>
  <version>1.9.3</version>
  <scope>test</scope>
</dependency>

Clojure (deps.edn):

{:deps {org.clojure/test.check {:mvn/version "1.1.2"}}}

Haskell:

cabal install QuickCheck
# or for Hedgehog:
cabal install hedgehog

Detecting Existing Usage

Search for PBT library imports in the codebase:

# Python
rg "from hypothesis import" --type py

# JavaScript/TypeScript
rg "from 'fast-check'" --type js --type ts

# Rust
rg "use proptest" --type rust

# Go
rg "pgregory.net/rapid" --type go

# Java
rg "@Property" --type java

# Clojure
rg "test.check" --type clojure

# Solidity (Echidna)
rg "echidna_" --glob "*.sol"