# \#testing

**URL:** https://discuss.ocaml.org/tag/testing/31.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Shellcheck for Cram tests](https://discuss.ocaml.org/t/shellcheck-for-cram-tests/18551)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 1\
**Last updated:** [September 22, 2026, 5:58pm UTC](https://discuss.ocaml.org/t/shellcheck-for-cram-tests/18551 "2026-09-22T17:58:44Z")

</div>

When writing Cram tests, we end up making some mistakes, and using Shellcheck would allow us to avoid some of them. However, the format of run.t files does not currently allow running it “as is”. I tried doing some simp…

---

## [\[ANN\] ortac-0.8 specification-driven testing with Domains](https://discuss.ocaml.org/t/ann-ortac-0-8-specification-driven-testing-with-domains/17927)

<div class="topic-metadata">

**Author:** [@n-osborne](https://discuss.ocaml.org/u/n-osborne)\
**Replies:** 1\
**Last updated:** [September 16, 2026, 11:42am UTC](https://discuss.ocaml.org/t/ann-ortac-0-8-specification-driven-testing-with-domains/17927 "2026-09-16T11:42:07Z")

</div>

Hi! We, at Tarides, are very excited to announce the release of ortac-0.8.0 for specification-driven testing! ortac is a tool in the Gospel ecosystem. The core idea is to translate a subset of the Gospel specification l…

---

## [Documenting the (negative) behaviour of a package (and \`mdx\` FTW)](https://discuss.ocaml.org/t/documenting-the-negative-behaviour-of-a-package-and-mdx-ftw/18240)

<div class="topic-metadata">

**Author:** [@Chet\_Murthy](https://discuss.ocaml.org/u/Chet_Murthy)\
**Replies:** 13\
**Last updated:** [June 12, 2026, 12:54pm UTC](https://discuss.ocaml.org/t/documenting-the-negative-behaviour-of-a-package-and-mdx-ftw/18240 "2026-06-12T12:54:23Z")

</div>

Recently I decided to do some … cleanup to the error-messages for a number of packages I develop, and in the process I started writing mdx tests that elicit each error-message. And in the process, I realized that for so…

---

## [Executable documentation examples?](https://discuss.ocaml.org/t/executable-documentation-examples/17971)

<div class="topic-metadata">

**Author:** [@Yoric](https://discuss.ocaml.org/u/Yoric)\
**Replies:** 1\
**Last updated:** [April 10, 2026, 8:22am UTC](https://discuss.ocaml.org/t/executable-documentation-examples/17971 "2026-04-10T08:22:43Z")

</div>

In Rust, the standard test harness will extract snippets from the documentation and run them as tests, e.g. the following documentation will fail the test suite: /\*\* \* Add two values \* \* \`\`\` \* assert\_eq!(add(2, 2…

---

## [Is there any way to capture the stdout & stderr output of the current process?](https://discuss.ocaml.org/t/is-there-any-way-to-capture-the-stdout-stderr-output-of-the-current-process/17415)

<div class="topic-metadata">

**Author:** [@ahelwer](https://discuss.ocaml.org/u/ahelwer)\
**Replies:** 8\
**Last updated:** [April 1, 2026, 12:20pm UTC](https://discuss.ocaml.org/t/is-there-any-way-to-capture-the-stdout-stderr-output-of-the-current-process/17415 "2026-04-01T12:20:56Z")

</div>

One of the more common side-effects for functions to have is writing output to stdout or stderr. This poses a problem when writing unit tests in OUnit2, both because having a whole bunch of output printed to the console …

---

## [\[ANN\] Testo 0.3](https://discuss.ocaml.org/t/ann-testo-0-3/17706)

<div class="topic-metadata">

**Author:** [@mjambon](https://discuss.ocaml.org/u/mjambon)\
**Replies:** 1\
**Last updated:** [January 20, 2026, 12:46pm UTC](https://discuss.ocaml.org/t/ann-testo-0-3/17706 "2026-01-20T12:46:16Z")

</div>

Testo 0.3.4 is out! Testo is an industry-grade test framework for OCaml. It is suitable for unit-testing OCaml code and for end-to-end testing command-line executables. Testo is an open-source project maintained by the …

---

## [Cram test errors and \*\*\*\* UNREACHABLE \*\*\*\*](https://discuss.ocaml.org/t/cram-test-errors-and-unreachable/17697)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 6\
**Last updated:** [January 15, 2026, 8:12pm UTC](https://discuss.ocaml.org/t/cram-test-errors-and-unreachable/17697 "2026-01-15T20:12:31Z")

</div>

Some kinds of errors in Dune Cram tests lead to a \*\*\*\*\* UNREACHABLE \*\*\*\*\* message, which makes it hard to debug what’s wrong. For instance: dune init proj foo cd foo mkdir cram.t echo " $ source foo.sh" \> cram.t/run.t…

---

## [Passing command-line arguments to inline tests](https://discuss.ocaml.org/t/passing-command-line-arguments-to-inline-tests/17678)

<div class="topic-metadata">

**Author:** [@neinaw](https://discuss.ocaml.org/u/neinaw)\
**Replies:** 0\
**Last updated:** [January 8, 2026, 8:56am UTC](https://discuss.ocaml.org/t/passing-command-line-arguments-to-inline-tests/17678 "2026-01-08T08:56:49Z")

</div>

I have a test function for a particular module for which the stimulus is read from a file. I have a file variable which is a string of the path to the file. To run the tests, I have to specify the input files in the “dep…

---

## [\[ANN\] QCheck 0.90: The Great Renaming](https://discuss.ocaml.org/t/ann-qcheck-0-90-the-great-renaming/17613)

<div class="topic-metadata">

**Author:** [@jmid](https://discuss.ocaml.org/u/jmid)\
**Replies:** 4\
**Last updated:** [December 30, 2025, 10:48pm UTC](https://discuss.ocaml.org/t/ann-qcheck-0-90-the-great-renaming/17613 "2025-12-30T22:48:26Z")

</div>

It is my pleasure to announce release 0.90 of the QCheck packages. QCheck is an OCaml library for randomized property-based testing in the style of Haskell’s QuickCheck. Release 0.90 · c-cube/qcheck · GitHub It has b…

---

## [Does dune runtest launch a separate process for each test file?](https://discuss.ocaml.org/t/does-dune-runtest-launch-a-separate-process-for-each-test-file/17540)

<div class="topic-metadata">

**Author:** [@ahelwer](https://discuss.ocaml.org/u/ahelwer)\
**Replies:** 0\
**Last updated:** [November 28, 2025, 12:36am UTC](https://discuss.ocaml.org/t/does-dune-runtest-launch-a-separate-process-for-each-test-file/17540 "2025-11-28T00:36:59Z")

</div>

I am using dune runtest with ounit2. Some of the tests I’m writing modify global refs in weird ways. If other tests were run with these modified global ref values it might cause weird behavior. Does dune runtest launch s…

---

## [Parsing interfaces that use external modules with Gospel](https://discuss.ocaml.org/t/parsing-interfaces-that-use-external-modules-with-gospel/17496)

<div class="topic-metadata">

**Author:** [@bord-o](https://discuss.ocaml.org/u/bord-o)\
**Replies:** 2\
**Last updated:** [November 25, 2025, 3:23am UTC](https://discuss.ocaml.org/t/parsing-interfaces-that-use-external-modules-with-gospel/17496 "2025-11-25T03:23:54Z")

</div>

Right now I’m experimenting with a new Ortac plugin, but I’m running into some limitations with gospel. Say I have an interface that needs to expose some code using an external dependency (qcheck generators in this case)…

---

## [Questions around the test and executable stanzas in dune](https://discuss.ocaml.org/t/questions-around-the-test-and-executable-stanzas-in-dune/16904)

<div class="topic-metadata">

**Author:** [@threepwood](https://discuss.ocaml.org/u/threepwood)\
**Replies:** 4\
**Last updated:** [November 12, 2025, 2:09pm UTC](https://discuss.ocaml.org/t/questions-around-the-test-and-executable-stanzas-in-dune/16904 "2025-11-12T14:09:56Z")

</div>

I am getting the sense from the documentation of dune that a custom test and an executable are roughly the same things, however I am very puzzled by various differences which make it hard for me to do what I want. I have…

---

## [\[ANN\] QCheck 0.24](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198)

<div class="topic-metadata">

**Author:** [@jmid](https://discuss.ocaml.org/u/jmid)\
**Replies:** 3\
**Last updated:** [November 3, 2025, 4:08pm UTC](https://discuss.ocaml.org/t/ann-qcheck-0-24/16198 "2025-11-03T16:08:10Z")

</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 :tada: QCheck is a library for randomized property-based testing, inspire…

---

## [\[ANN\] Testo 0.2.0 – test library with support for snapshots, parallel runs, xfails, timeouts](https://discuss.ocaml.org/t/ann-testo-0-2-0-test-library-with-support-for-snapshots-parallel-runs-xfails-timeouts/17244)

<div class="topic-metadata">

**Author:** [@mjambon](https://discuss.ocaml.org/u/mjambon)\
**Replies:** 0\
**Last updated:** [September 13, 2025, 2:57am UTC](https://discuss.ocaml.org/t/ann-testo-0-2-0-test-library-with-support-for-snapshots-parallel-runs-xfails-timeouts/17244 "2025-09-13T02:57:09Z")

</div>

Testo was designed as a feature-rich testing framework that makes common tasks easy and unusual ones possible. It is similar to Alcotest but supports more options including notably: snapshotting: large output capture a…

---

## [\[ANN\] (ppx\_inline\_test|ppx\_expect)\_nobase](https://discuss.ocaml.org/t/ann-ppx-inline-test-ppx-expect-nobase/17024)

<div class="topic-metadata">

**Author:** [@Kakadu](https://discuss.ocaml.org/u/Kakadu)\
**Replies:** 1\
**Last updated:** [August 20, 2025, 8:11am UTC](https://discuss.ocaml.org/t/ann-ppx-inline-test-ppx-expect-nobase/17024 "2025-08-20T08:11:10Z")

</div>

Recently I got tied of opam which wants to upgrade many packages which one of it’s dependencies is upgradable. Usually it happened for ppx\_inline\_test/ppx\_expect packages, because some JaneStreet’s package was going to b…

---

## [\[ANN\] qcheck-lin and qcheck-stm 0.2](https://discuss.ocaml.org/t/ann-qcheck-lin-and-qcheck-stm-0-2/12301)

<div class="topic-metadata">

**Author:** [@jmid](https://discuss.ocaml.org/u/jmid)\
**Replies:** 6\
**Last updated:** [July 29, 2025, 4:57pm UTC](https://discuss.ocaml.org/t/ann-qcheck-lin-and-qcheck-stm-0-2/12301 "2025-07-29T16:57:36Z")

</div>

I’m happy to share release 0.2 of qcheck-lin and qcheck-stm for black-box property-based testing. qcheck-lin requires little more than an interface description. It allows to test a library for sequential consistency, …

---

## [An example for every OCaml package](https://discuss.ocaml.org/t/an-example-for-every-ocaml-package/16953)

<div class="topic-metadata">

**Author:** [@JohnWhitington](https://discuss.ocaml.org/u/JohnWhitington)\
**Replies:** 9\
**Last updated:** [July 15, 2025, 6:51pm UTC](https://discuss.ocaml.org/t/an-example-for-every-ocaml-package/16953 "2025-07-15T18:51:04Z")

</div>

(One day, maybe). Wouldn’t it be nice if every OCaml package had examples as well as documentation? As part of a pilot programme funded by the OCaml Software Foundation, I’ve been looking into the feasibility of such an…

---

## [Brittleness of snapshot tests](https://discuss.ocaml.org/t/brittleness-of-snapshot-tests/16724)

<div class="topic-metadata">

**Author:** [@shonfeder](https://discuss.ocaml.org/u/shonfeder)\
**Replies:** 11\
**Last updated:** [May 28, 2025, 5:51pm UTC](https://discuss.ocaml.org/t/brittleness-of-snapshot-tests/16724 "2025-05-28T17:51:59Z")

</div>

Can you elaborate on this? What is brittle here?

---

## [Expect magic in ppxlib tests](https://discuss.ocaml.org/t/expect-magic-in-ppxlib-tests/16734)

<div class="topic-metadata">

**Author:** [@joelreymont](https://discuss.ocaml.org/u/joelreymont)\
**Replies:** 1\
**Last updated:** [May 31, 2025, 1:41am UTC](https://discuss.ocaml.org/t/expect-magic-in-ppxlib-tests/16734 "2025-05-31T01:41:39Z")

</div>

How does this magic in ppxlib tests work? How does the AST resulting from %stri, etc. make it to stdout? Better yet, how does the loc declaration at line 1 make it to stdout?

---

## [Blog post: Using model-based testing on a Mirage filesystem implementation](https://discuss.ocaml.org/t/blog-post-using-model-based-testing-on-a-mirage-filesystem-implementation/16666)

<div class="topic-metadata">

**Author:** [@gasche](https://discuss.ocaml.org/u/gasche)\
**Replies:** 2\
**Last updated:** [May 17, 2025, 12:33pm UTC](https://discuss.ocaml.org/t/blog-post-using-model-based-testing-on-a-mirage-filesystem-implementation/16666 "2025-05-17T12:33:29Z")

</div>

I am attending the MirageOS retreat in Marrakesh, with in particular: Mindy @yomimono, who implemented a small (but not so simple) file system for Mirage, Chamelon Armaël @armael, who is interested in testing effectful…

---

## [SCGI library for OCaml and eio](https://discuss.ocaml.org/t/scgi-library-for-ocaml-and-eio/16498)

<div class="topic-metadata">

**Author:** [@MarcCoquand](https://discuss.ocaml.org/u/MarcCoquand)\
**Replies:** 0\
**Last updated:** [April 14, 2025, 2:46pm UTC](https://discuss.ocaml.org/t/scgi-library-for-ocaml-and-eio/16498 "2025-04-14T14:46:40Z")

</div>

Hey everyone! To learn a bit of networking and eio, I wrote an scgi library with eio support. It aims to just implement the scgi protocol and a few helpers for writing HTTP responses. It’s still very new, and I am look…

---

## [Build systems and snapshot testing support](https://discuss.ocaml.org/t/build-systems-and-snapshot-testing-support/16404)

<div class="topic-metadata">

**Author:** [@Kakadu](https://discuss.ocaml.org/u/Kakadu)\
**Replies:** 20\
**Last updated:** [March 31, 2025, 4:42pm UTC](https://discuss.ocaml.org/t/build-systems-and-snapshot-testing-support/16404 "2025-03-31T16:42:50Z")

</div>

I recently tried to find how to implement dune-like cram testing for C++ project, and it looks like CMake is not mature enough to do this. I’m curious, should I give Bazel a chance regarding this? Because, if it can’t d…

---

## [\[ANN\] Ortac 0.6.0 improve bug reporting](https://discuss.ocaml.org/t/ann-ortac-0-6-0-improve-bug-reporting/16232)

<div class="topic-metadata">

**Author:** [@n-osborne](https://discuss.ocaml.org/u/n-osborne)\
**Replies:** 0\
**Last updated:** [March 6, 2025, 8:31am UTC](https://discuss.ocaml.org/t/ann-ortac-0-6-0-improve-bug-reporting/16232 "2025-03-06T08:31:45Z")

</div>

Hi everyone! We - at Tarides - are very pleased to announce the release of the Ortac-0.6.0 packages for specification-driven testing! Ortac/QCheck-STM is a test generator based on the QCheck-STM model-based testing fra…

---

## [Broken ppx\_inline\_test?](https://discuss.ocaml.org/t/broken-ppx-inline-test/15956)

<div class="topic-metadata">

**Author:** [@giltho](https://discuss.ocaml.org/u/giltho)\
**Replies:** 2\
**Last updated:** [January 14, 2025, 3:39pm UTC](https://discuss.ocaml.org/t/broken-ppx-inline-test/15956 "2025-01-14T15:39:42Z")

</div>

Hello, I’m having trouble compiling something with ppx\_inline\_test under OCaml 5.3 and I’m not sure what’s happening. When using module%test, I simply get Error: value expected (both in lsp and when building). I’ve …

---

## [\[ANN\] Ortac 0.5.0 testing higher order functions](https://discuss.ocaml.org/t/ann-ortac-0-5-0-testing-higher-order-functions/15945)

<div class="topic-metadata">

**Author:** [@n-osborne](https://discuss.ocaml.org/u/n-osborne)\
**Replies:** 0\
**Last updated:** [January 13, 2025, 10:48am UTC](https://discuss.ocaml.org/t/ann-ortac-0-5-0-testing-higher-order-functions/15945 "2025-01-13T10:48:18Z")

</div>

Hi everyone! I’m very pleased to announce the release of the Ortac-0.5.0 packages for specification-driven testing! Ortac/QCheck-STM is a test generator based on the QCheck-STM model-based testing framework and the Gos…

---

## [\[ANN\] QCheck 0.23](https://discuss.ocaml.org/t/ann-qcheck-0-23/15790)

<div class="topic-metadata">

**Author:** [@jmid](https://discuss.ocaml.org/u/jmid)\
**Replies:** 0\
**Last updated:** [December 13, 2024, 2:40pm UTC](https://discuss.ocaml.org/t/ann-qcheck-0-23/15790 "2024-12-13T14:40:13Z")

</div>

I’m happy to announce the 0.23 release of qcheck-core, qcheck, qcheck-alcotest, and qcheck-ounit, along with a 0.5 release of ppx\_deriving\_qcheck :tada: The biggest user-visible change is the addition of a qcheck-core o…

---

## [\[ANN\] Testo 0.1.0 - a new testing framework for OCaml](https://discuss.ocaml.org/t/ann-testo-0-1-0-a-new-testing-framework-for-ocaml/15624)

<div class="topic-metadata">

**Author:** [@mjambon](https://discuss.ocaml.org/u/mjambon)\
**Replies:** 3\
**Last updated:** [December 1, 2024, 2:43pm UTC](https://discuss.ocaml.org/t/ann-testo-0-1-0-a-new-testing-framework-for-ocaml/15624 "2024-12-01T14:43:08Z")

</div>

On this 86th anniversary of the first synthesis of LSD by Albert Hofmann, it is my pleasure to announce Testo, a new testing library for OCaml. It borrows a lot of ideas from Alcotest and is similar in spirit but adds a…

---

## [\[ANN\] Ortac/QCheck-STM 0.4.0 Dynamic formal verification beyond one system under test](https://discuss.ocaml.org/t/ann-ortac-qcheck-stm-0-4-0-dynamic-formal-verification-beyond-one-system-under-test/15427)

<div class="topic-metadata">

**Author:** [@n-osborne](https://discuss.ocaml.org/u/n-osborne)\
**Replies:** 0\
**Last updated:** [October 11, 2024, 3:34pm UTC](https://discuss.ocaml.org/t/ann-ortac-qcheck-stm-0-4-0-dynamic-formal-verification-beyond-one-system-under-test/15427 "2024-10-11T15:34:17Z")

</div>

Hi everyone! I’m very pleased to announce this exciting new release of ortac-qcheck-stm.0.4.0! This new release brings some exciting new features, mostly the result of Nikolaus Huber’s contributions! Thank you Nik! Or…

---

## [\[ANN\] Mutaml 0.1](https://discuss.ocaml.org/t/ann-mutaml-0-1/12639)

<div class="topic-metadata">

**Author:** [@jmid](https://discuss.ocaml.org/u/jmid)\
**Replies:** 1\
**Last updated:** [October 8, 2024, 3:52pm UTC](https://discuss.ocaml.org/t/ann-mutaml-0-1/12639 "2024-10-08T15:52:21Z")

</div>

I’m happy to announce the release of Mutaml 0.1, a mutation testing tool for OCaml: Mutaml attempts to make small random changes your code, e.g., turning e+1 into e to see if the off-by-one change is caught by your tes…

---

## [\[ANN\] Mica, a PPX that automates differential testing for OCaml modules](https://discuss.ocaml.org/t/ann-mica-a-ppx-that-automates-differential-testing-for-ocaml-modules/15406)

<div class="topic-metadata">

**Author:** [@ngernest](https://discuss.ocaml.org/u/ngernest)\
**Replies:** 0\
**Last updated:** [October 6, 2024, 4:57pm UTC](https://discuss.ocaml.org/t/ann-mica-a-ppx-that-automates-differential-testing-for-ocaml-modules/15406 "2024-10-06T16:57:35Z")

</div>

I’m delighted to announce the initial release of Mica, a PPX deriver that automates differential testing for a pair of OCaml modules implementing the same signature. Users annotate module signatures with the directive \[@…

[Next page](https://discuss.ocaml.org/tag/testing/31.md?match_all_tags=true&page=1&tags%5B%5D=testing)
