Skip to content
SPECIFICTION
Get listed

Hypothesis vs QCheck

Hypothesis

hypothesis.works

QCheck

github.com

Side by side

FigureHypothesisQCheck
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYes—
macOSYes—
LinuxYesYes
Plans published01
Spec score · Property-Based Testing Tools7.4 (#15)7.9 (#9)
IntegrationsFirst-party extras include integrations for specific packages, and the documentation gives Django as an example installable extra.The project provides integration layers for OUnit and Alcotest, and the README describes using QCheck with Rely through an npm package.
Test runnersHypothesis tests can run as regular Python functions and work with pytest or unittest.The qcheck-core package includes QCheck_base_runner, and the qcheck package includes QCheck_runner with OUnit compatibility.

Plans

Hypothesis

No plans published.

Hypothesis pricing →

QCheck

  • QCheckFree

QCheck pricing →

In their own words

Hypothesis

Hypothesis is a free property-based testing library for Python. You describe behavior that your code should satisfy, and it generates inputs—including edge cases—to explore whether those properties hold. Strategies let you define and combine the data used in tests. When a failure appears, Hypothesis reports an example and tries to simplify it; failing examples are stored in a local test database for replay in later runs. Tests run as ordinary Python functions within pytest, unittest, nose, or another framework that can run a Python function. Hypothesis is not itself a test runner. By default, it generates 100 random inputs per test, and max_examples controls that count. Rule-based state machines can generate sequences of operations for testing stateful systems and objects. The project supports and tests CPython and PyPy 3.10 and later, and says it regularly works on Linux, macOS, Windows, and Emscripten. Its compatibility policy supports only the newest Hypothesis version; undocumented behavior may change in patch releases.

Visit hypothesis.works

QCheck

QCheck is a property-based testing library for OCaml, inspired by QuickCheck. Rather than relying only on hand-picked examples, it provides combinators to generate values such as lists, arrays, tuples, recursive types, and algebraic types for checking properties. When a check fails, generators can be paired with printers and shrinkers to show and reduce counterexamples. QCheck2 builds shrinking into its generators, though the project describes that API as less battle-tested than QCheck. The package family includes qcheck-core, qcheck-ounit, qcheck-alcotest, qcheck, and ppx_deriving_qcheck; the last can derive generators from type declarations. Runner options include QCheck_base_runner in qcheck-core and QCheck_runner with OUnit compatibility in qcheck, with integration layers for OUnit and Alcotest. The project also points to qcheck-stm for sequential and parallel model-based tests and qcheck-lin for sequential consistency testing. Installation is available through opam, and the source can be built with make. The minimal qcheck-core package depends only on unix and dune. QCheck is free and licensed under BSD-2-Clause.

Visit github.com