EVERYTHING XIAOMI
Get listed

QCheck

QCheck is a free, QuickCheck-inspired property-based testing library for OCaml.

Place
#7 of 28
Score
6.0
QCheck's website

What QCheck is

QCheck is a free, QuickCheck-inspired property-based testing library for OCaml. It lets developers generate varied inputs and check whether specified properties hold, using combinators for lists, arrays, tuples, recursive types, and algebraic types. When a property fails, generators can be paired with printers and shrinkers to show and reduce the counterexample. Shrinking is integrated into QCheck2 generators, though the project describes QCheck2 as less battle-tested than QCheck. The package collection includes qcheck-core, qcheck-ounit, qcheck-alcotest, qcheck, and ppx_deriving_qcheck; the latter can derive generators from type declarations. Runner choices include QCheck_base_runner in qcheck-core and QCheck_runner with OUnit compatibility in qcheck. Integration layers are available for OUnit and Alcotest. For stateful or model-based work, the project 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 project recommends qcheck-core for a minimal dependency set; it depends only on unix and dune. QCheck is licensed under BSD-2-Clause.

Good

  • Generators cover lists, arrays, tuples, and recursive types.
  • Shrinking can reduce failing counterexamples.
  • Provides OUnit and Alcotest integration layers.
  • qcheck-core is available for a minimal installation.
  • Can derive generators from type declarations.

Watch out

  • QCheck2 is described as less battle-tested than QCheck.
  • The library targets OCaml.
  • Installation instructions use opam or building from source.

Who it suits

QCheck suits OCaml developers who want to test properties over generated inputs rather than rely only on individual examples. Its runner and integration packages cover projects using OUnit or Alcotest.

Verdict

QCheck offers a broad generator and counterexample toolset for OCaml property-based testing, with package options for different runners and integrations. Consider the project’s maturity caveat if choosing QCheck2.

Plans and prices

From QCheck's own pricing page, checked 7 Oct 2026.

All about pricing
PlanPriceWhat it gives you
QCheckFreeOCaml property-based testing library · BSD-2-Clause license

The facts

Each one read from QCheck's own pages, with the date it was checked.

What it does

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

Alternatives to QCheck

All alternatives
  1. 1fast-check logo

    fast-check

    Free planOpen sourceWebAPILinuxSelf-hosted
    7.1Free plan
  2. 2

    ScalaCheck

    Free planLinuxmacOSWindows
    6.6Free plan
  3. 3

    Gopter

    Free planLinuxSelf-hosted
    6.4Free plan
  4. 4

    JSVerify

    Free planWebSelf-hosted
    6.4Free plan
  5. 5

    Racket QuickCheck

    Free planLinuxmacOSWindows
    6.4Free plan
  6. 6

    FsCheck

    Free planLinuxmacOSWindows
    6.3Free plan