Hypothesis is a mature property-based testing library for Python. The core runtime, exposed via @given in hypothesis/src/hypothesis/__init__.py, executes each decorated test many times with inputs drawn from composable SearchStrategy objects (integers, floats, text, regex, collections, datetimes, plus extras generating numpy arrays, pandas DataFrame/Series, Django models/forms, lark grammars, and more). All randomness flows through a formal choice IR (hypothesis/internal/conjecture/choice.py) into a pluggable PrimitiveProvider; the default conjecture engine (engine.py) maintains a DataTree of previously seen choice prefixes to avoid redundant exploration and detect flaky tests, and when a failure is found a cascade of shrinking passes (shrinker.py plus the shrinking/ package) reduces it to a minimal counterexample. An example database layer (in-memory, directory-based, and GitHub-artifact backends) persists and replays failures across runs, and an observability subsystem emits structured JSONL metadata per test case. The package also ships application surfaces beyond the library API: a pytest plugin (statistics, health checks, capture, deadline reporting), a CLI (a ghostwriter that auto-generates property tests from signatures/docstrings, plus codemods and failure-patching commands), and a stateful-testing framework (RuleBasedStateMachine, Bundle, @rule/@invariant). A PyO3 Rust extension (hypothesis/rust) accelerates float encoding, and the provider abstraction is validated by an embedded conformance test suite so third-party backends (e.g., CrossHair symbolic execution) can drive generation. Internal subsystems are unusually well-factored — filter predicates are rewritten into tighter strategy constraints via AST analysis, lambda sources are recovered from bytecode, and Unicode character ranges are modelled as interval sets — making several modules reusable outside the project. This is a developer-tool library with CLI and pytest entry points, not a runtime service; the repo also includes its own build/release tooling, a Pelican website, docs, and a very large self-testing suite with enforced 100% branch coverage.
ScalaCheck is a mature, well-crafted library for automated property-based testing in Scala. It provides a rich set of generators (Gen), property combinators (Prop), implicit arbitrary instances (Arbitrary), and shrinking (Shrink) for test case minimization. The library supports stateful testing via the Commands API and includes a deterministic PRNG (Seed). It is cross-compiled for JVM, JavaScript, and Native platforms, and integrates seamlessly with sbt's test framework. The codebase is clean, well-structured, and extensively tested, with active maintenance by the Typelevel organization.
Kotest is a comprehensive, multiplatform testing framework for Kotlin, providing a rich assertion library, property-based testing, multiple spec styles (FunSpec, StringSpec, WordSpec, etc.), a modular test engine, and extensive extension system (Spring, Testcontainers, Allure, etc.). It includes IntelliJ IDEA plugin for gutter icons, test navigation, and run configurations, as well as Gradle plugin for build integration. The framework is well-architected with clean abstractions like the Matcher interface, Arb/Gen combinators, and test execution interceptors, though some deprecated APIs and experimental features indicate ongoing evolution.
jsf is a Python library that generates fake data conforming to JSON schemas. It provides programmatic and CLI interfaces for creating realistic test data, supports custom data providers, maintains state for dependent data generation, validates output against schemas, and integrates with FastAPI for automatic API documentation. The architecture follows a modular design where each JSON schema type is handled by a specific class in jsf/schema_types/, with the core parsing logic in jsf/parser.py. The project uses Pants for building, has comprehensive test coverage, and maintains active CI/CD pipelines with automated releases based on conventional commits.