# \[ANN\] QCheck 0.24

**URL:** <https://discuss.ocaml.org/t/ann-qcheck-0-24/16198>\
**Category:** Community\
**Tags:** qcheck, testing, announce\
**Created:** [February 27, 2025, 6:37pm UTC](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198 "2025-02-27T18:37:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmid](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jmid](https://discuss.ocaml.org/u/jmid)\
**Post date:** [February 27, 2025, 6:37pm UTC](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198/1 "2025-02-27T18:37:14Z")

</div>

I’m happy to announce the 0.24 release of `qcheck`, `qcheck-core`, `qcheck-alcotest`, and `qcheck-ounit`, along with a 0.6 release of `ppx_deriving_qcheck` 🎉

`QCheck` is a library for randomized property-based testing, inspired by Haskell’s seminal QuickCheck library. The 0.24 release contains a range of improvements to the integrated shrinking of `QCheck2`, initially introduced in the 0.18 release. As a consequence, its shrinking algorithms should act more predictably, reduce faster, and report smaller counterexamples. In essence, the 0.24 release is what we hoped 0.18 would be. The release also adds missing `result`, `int32`, and `int64` combinators, as well as more documentation.

If you’ve previously given `QCheck2`’s integrated shrinking a spin, I encourage you to try it again with the patched 0.24 release. For new users, the 0.24 release is also a good candidate to check out! 😃  
Please share any problems you encounter on the `qcheck` repo: [GitHub - c-cube/qcheck: QuickCheck inspired property-based testing for OCaml.](https://github.com/c-cube/qcheck)

Full change log:

- [qcheck-alcotest] Add an optional `speed_level` parameter to `to_alcotest`
- Adjust the `QCheck2.Gen.list` shrinker to produce minimal counterexamples at size 3 too
- Replace the `QCheck2` OCaml 4 `Random.State.split` hack with a faster one
- Improve the `QCheck2.Gen.list` shrinker heuristic and utilize the improved shrinker in other `QCheck2` `{list,array,bytes,string,function}*` shrinkers
- Use `split` and `copy` in `Random.State` underlying `QCheck2` to avoid non-deterministic shrinking behaviour
- Add missing documentation strings for `QCheck.{Print,Iter,Shrink,Gen}` and `QCheck2.Gen`.
- Add `result` combinators to `QCheck`, `QCheck.{Gen,Print,Shrink,Observable}`, and `QCheck2.{Gen,Print,Observable}`.
- Add missing combinators `QCheck{,2}.Print.int{32,64}`, `QCheck.Gen.int{32,64}`, `QCheck{,2}.Observable.int{32,64}`, and deprecate `QCheck.Gen.{ui32,ui64}`
- Document `dune` usage in README

Happy testing! 😃 ⌨

---

<div class="post-metadata">

**Author:** ![jmid](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jmid](https://discuss.ocaml.org/u/jmid)\
**Post date:** [April 7, 2025, 10:40am UTC](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198/2 "2025-04-07T10:40:48Z")

</div>

FYI, QCheck 0.25 is now available from the opam repository 😃

> **[Releases · c-cube/qcheck](https://github.com/c-cube/qcheck/releases/)**
>
> QuickCheck inspired property-based testing for OCaml. - c-cube/qcheck

The 0.25 release contains a combination of all-round fixes, documentation, and polishing:

- Restore `Test.make`’s `max_fail` parameter which was accidentally broken in 0.18
- Adjust `stats` computation of average and standard deviation to limit precision loss, print both using scientific notation, and workaround MinGW float printing to also pass expect tests
- Fix dune snippets missing a language specifier in README.adoc causing `asciidoc` to error
- Add a note to `QCheck{,2.Gen}.small_int_corners` and `QCheck{,2}.Gen.graft_corners` about internal state, and fix a range of documentation reference warnings
- Reorganize and polish the `README`, rewrite it to use `qcheck-core`, and add a `QCheck2` integrated shrinking example
- Document `QCHECK_MSG_INTERVAL` introduced in 0.20
- Add `QCheck{,2}.Gen.map{4,5}` combinators

The accompanying `ppx_deriving_qcheck.0.7` release offers:

- Support `ppxlib.0.36.0` based on the OCaml 5.2 AST

Thanks to @Pat-Lafon and @patricoferris for contributing PRs! 🎉

Happy testing! 😃 ⌨

---

<div class="post-metadata">

**Author:** ![jmid](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jmid](https://discuss.ocaml.org/u/jmid)\
**Post date:** [July 12, 2025, 9:07am UTC](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198/3 "2025-07-12T09:07:29Z")

</div>

QCheck 0.26 is now available from your favorite opam repository! 🎉

> **[Releases · c-cube/qcheck](https://github.com/c-cube/qcheck/releases)**
>
> QuickCheck inspired property-based testing for OCaml. - c-cube/qcheck

The 0.26 release adjusts the `QCheck` and `QCheck2` `float` generator distributions, which was previously confined to a subset of floating point numbers. Users may experience that existing tests known to pass start to fail with the new and broader distribution. In addition the release contains a number of other fixes and documentation improvements, incl. the removal of an annoying newline which would cause the test suite to fail on OCaml 5.4.0:

- Align printed `collect` statistics and also add a percentage
- Fix `QCheck{,2}.Gen.float` generator which would only generate numbers with an exponent between 2^{-21} and 2^{22}
- Elaborate on the `QCheck`/`QCheck2` situation in the README
- Add a missing `description` field to the \*.opam files
- Document `Shrink` invariants in the `QCheck` module
- Fix a `qcheck-ounit` test suite failure on OCaml 5.4, removing a needless extra newline
- Fix `QCheck2` `float_range` operator which would fail on negative bounds
- Fix `QCHECK_MSG_INTERVAL` not being applied to the first in-progress message

Thanks to @Pat-Lafon, @rmonat, and @kit-ty-kate for contributing! 🙏

---

<div class="post-metadata">

**Author:** ![jmid](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jmid](https://discuss.ocaml.org/u/jmid)\
**Post date:** [November 3, 2025, 4:08pm UTC](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198/4 "2025-11-03T16:08:10Z")

</div>

QCheck 0.27 is now available from the opam repository 🥳

> **[Release 0.27 · c-cube/qcheck](https://github.com/c-cube/qcheck/releases/tag/v0.27)**
>
> The 0.27 release is focused on improving the float shrinking support and also contains a small patch to make the package compile with OxCaml:
> 
> Add QCheck.Shrink.float and enable shrinking for QChec...

The 0.27 release is focused on improving the `float` shrinking support and also contains a small patch to make the package compile with OxCaml:

- Add `QCheck.Shrink.float` and enable shrinking for `QCheck.float`
- Add `QCheck.Shrink.float_bound` and enable shrinking for `QCheck.float_bound_inclusive` and `QCheck.float_bound_exclusive`
- Add `QCheck.Shrink.float_range` and enable shrinking for `QCheck.float_range`
- Enable shrinking for `QCheck.{pos_float,neg_float,exponential}`
- Patch `QCheck.Print.float` and `QCheck2.Print.float` to print negative nans consistently as “-nan” also on Windows and macOS, and correct documentation for `QCheck.{float,pos_float,neg_float}` in that they may produce `nan`s since #350 from 0.26
- Eta-expand a couple of partial application to compile under OxCaml

Happy testing! 😃
