# Does dune runtest launch a separate process for each test file?

**URL:** https://discuss.ocaml.org/t/does-dune-runtest-launch-a-separate-process-for-each-test-file/17540
**Category:** Learning
**Tags:** testing, ounit, dune
**Created:** [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")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ahelwer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/ahelwer/32/6236_2.png) [@ahelwer](https://discuss.ocaml.org/u/ahelwer)
#### Post date: [November 28, 2025, 12:36am UTC](https://discuss.ocaml.org/t/does-dune-runtest-launch-a-separate-process-for-each-test-file/17540/1 "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 separate processes for each test file, thus re-initializing these global refs to their default values? Tests within the same file or at least same `>:::` test suite seem to all run within the same process.
