Skip to content
SPECIFICTION
Get listed

QCheck

github.com

Free plan Linux
Visit github.com
Spec score 7.9 #9 of 28 in Property-Based Testing Tools

What it is

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.

Spec sheet

Purpose
QCheck is a QuickCheck-inspired property-based testing library for OCaml.Read 7 Oct 2026 · github.com
Integrations
The project provides integration layers for OUnit and Alcotest, and the README describes using QCheck with Rely through an npm package.Read 7 Oct 2026 · github.com
License
The repository identifies its license as BSD-2-Clause and says the code is released under the BSD license.Read 7 Oct 2026 · github.com
Core dependencies
The README says qcheck-core depends only on unix and dune and recommends it for a minimal installation.Read 7 Oct 2026 · github.com
Counterexamples
Generators can be paired with printers and shrinkers to display and minimize counterexamples when a property fails.Read 7 Oct 2026 · github.com
Documentation
The project documentation site lists documentation for five opam packages, with qcheck-core, qcheck, qcheck-alcotest, and qcheck-ounit at version 0.91 and ppx_deriving_qcheck at 0.9.Read 7 Oct 2026 · c-cube.github.io
Generators
QCheck includes combinators for constructing random generators, including generators for lists, arrays, recursive types, algebraic types, and tuples.Read 7 Oct 2026 · github.com
Install
The README gives opam install commands for qcheck-core and qcheck, and says the source can be built with make.Read 7 Oct 2026 · github.com
Installation
QCheck can be installed through opam, and the README recommends qcheck-core for a minimal dependency set.Read 7 Oct 2026 · github.com
Integrated shrinking
The README says shrinking is built into QCheck2 generators, so users do not need to hand-write shrinkers for that API.Read 7 Oct 2026 · github.com
Maintainer
The project page says it is maintained by c-cube, whose GitHub profile identifies Simon Cruanes.Read 7 Oct 2026 · github.com
Maturity note
The README describes QCheck2 as newer and less battle-tested than QCheck.Read 7 Oct 2026 · github.com
Model-based testing
The README points to the multicoretests repository for qcheck-stm, which runs sequential and parallel model-based tests, and qcheck-lin, which tests sequential consistency.Read 7 Oct 2026 · github.com
Package collection
The project provides opam packages including qcheck-core, qcheck-ounit, qcheck-alcotest, qcheck, and ppx_deriving_qcheck.Read 7 Oct 2026 · github.com
Packages
The project provides opam packages including qcheck-core, qcheck-ounit, qcheck-alcotest, qcheck, and ppx_deriving_qcheck.Read 7 Oct 2026 · github.com
QCheck2
QCheck2 integrates shrinking into its generators and the README describes it as less battle tested than QCheck.Read 7 Oct 2026 · github.com
Random generators
QCheck includes combinators for generating values such as lists, arrays, tuples, recursive types, and algebraic types.Read 7 Oct 2026 · github.com
Test runners
The qcheck-core package includes QCheck_base_runner, and the qcheck package includes QCheck_runner with OUnit compatibility.Read 7 Oct 2026 · github.com
Type derivation
The ppx_deriving_qcheck package can automatically derive generators from type declarations.Read 7 Oct 2026 · github.com

Plans and prices

QCheck Free OCaml property-based testing library · BSD-2-Clause license Read 7 Oct 2026 · github.com

Every QCheck plan and price →

Strong points and limits

Strong points

  • Free, with BSD-2-Clause license
  • Generators cover common and recursive types
  • QCheck2 integrates shrinking into generators
  • OUnit and Alcotest integration layers
  • Model-based testing options are documented

Limits

  • QCheck2 is described as less battle-tested
  • The listed platform is Linux

Who it suits

It suits OCaml developers who want to check properties over generated inputs, including teams using OUnit or Alcotest. The minimal qcheck-core package is an option when a small dependency set matters.

Verdict

QCheck offers a broad set of OCaml generators, failure-case shrinking, and runner integrations. The project distinguishes QCheck2 as newer and less battle-tested, which is worth weighing when choosing its integrated shrinking API.

Where Specifiction places it

Alternatives to QCheckAll alternatives →