# \[ANN\] hegel-ocaml 0.25.0 - concurrent stateful property-based testing

**URL:** <https://discuss.ocaml.org/t/ann-hegel-ocaml-0-25-0-concurrent-stateful-property-based-testing/18575>\
**Category:** Ecosystem\
**Tags:** announce\
**Created:** [October 1, 2026, 10:34am UTC](https://discuss.ocaml.org/t/ann-hegel-ocaml-0-25-0-concurrent-stateful-property-based-testing/18575 "2026-10-01T10:34:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![echoumcp1](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/echoumcp1/32/6599_2.png) [@echoumcp1](https://discuss.ocaml.org/u/echoumcp1)\
**Post date:** [October 1, 2026, 10:34am UTC](https://discuss.ocaml.org/t/ann-hegel-ocaml-0-25-0-concurrent-stateful-property-based-testing/18575/1 "2026-10-01T10:34:31Z")

</div>

Hello, we excited to announce hegel-ocaml 0.25.0!

Since our last announcement of hegel-ocaml 0.14.1, we’ve added concurrent stateful property-based testing and nondeterminism handling to Hegel. Stateful property based testing sequences actions (which we call rules) that mutate the state of some model and the system under test. The concurrent part comes from running rules concurrently. Hegel spins up some number of workers and distributes some number of rules to each worker. Rules within a worker run sequentially, but rules in different workers may run concurrently. Of course, this introduces nondeterminism since the workers can run in any order or suspend. To handle this, Hegel repeatedly replays failures and outputs the number of times the failure was reproduced. Nondeterminism handling can also be turned off, so any nondeterministic failure produces a flaky test error instead. Of course, running Hegel inside of [Antithesis](https://antithesis.com) will give reproducible failures.

For an example of concurrent stateful testing, see the [docs](https://hegel.dev/ocaml/hegel/Hegel/Stateful#concurrent-stateful-testing).

The unique feature of Hegel concurrent stateful tests is the ability to pass in different concurrency capabilities. Workers can be on threads, domains, or anything of the [`Concurrency.t` type.](https://hegel.dev/ocaml/hegel/Hegel/Concurrency#type-t.spawn_join_n) We have included a thread capability and domains capability for your convenience. Hegel defaults to using threads.

With the [`hegel_jane_async`](https://hegel.dev/ocaml/hegel/hegel_jane_async) sublibrary, Jane Street ecosystem users can also run sequential stateful tests whose rules are async (returning `unit Deferred.t`).

For OxCaml users, hegel-ocaml is fully compatible with OxCaml 5.2.0-minus39. With the [`hegel_jane_concurrent`](https://hegel.dev/ocaml/hegel/hegel_jane_concurrent) sublibrary, OxCaml users can also pass in concurrency capabilities from the `Concurrent` library. and run concurrent async stateful tests with `hegel_jane_async`.

Happy testing and contributing!
