Inline (Unit) Tests for OCaml (formerly "qtest")
OCaml Emacs Lisp Shell
Switch branches/tags
Nothing to show
Pull request Compare This branch is 210 commits behind vincent-hugot:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

iTeML : Inline (Unit) Tests for OCaml

iTeML is an inline test extraction utility, originally developed internally for Batteries under the name "qTest".


qTest version 2 is the current implementation, and it considered stable and feature-complete. It is available under the qtest/ directory of this repository. It has extensive (but not quite up-to-date) documentation, as well as good syntax highlighting for Kate (KatePart: KWrite, KDevelop, Konqueror,...) and basic support for Emacs.

For a sanity check of the system and a raw demonstration of available syntaxes, see the qtest/tests/ subdirectory.

qTest2 relies on oUnit to provide the underlying testing framework.

Backwards-incompatible changes are unlikely to be considered.

Building, installing, un-installing

Execute one of:

ocaml qtest build   [prefix]
ocaml qtest install [prefix]
ocaml qtest remove  [prefix]

OASIS will be used as backend.

Future works

There are ideas floating around on how to improve qTest2, generally revolving around going from a test "extraction" to an "annotation" model. The new version will be called iteml, and can be thought of as qtest3. No timetable is set yet, as all parties involved are busy bees.

All ideas, included (and especially!) crazy ones, are welcome at this stage, and backwards compatibility with qtest2 is not a consideration.

History of the project

(or at least, what I (VH) can unearth of it thanks to git logs)

  • 2007--2008 : Ilmari Heikkinen writes make_suite.rb for his
  • Jan 17, 2011: make_suite.rb is copied into Batteries. (=qtest0)
  • Jan 27, 2011: Kaustuv Chaudhuri writes from scratch an equivalent make_suite.mll to replace the Ruby script. (=qtest1)
  • Jan 19, 2012: Vincent Hugot writes from scratch a new version, with a lot of new features. Syntax changes a bit. (=qtest2)
  • Oct 21, 2012: qtest2 moves to its own repository.

Over time, the various versions of qtest have received additional contributions by: Eric Norige, Gabriel Scherer, Cedric Cellier, Valentin Gatien-Baron and Max Mouratov.


The issues system of github seems the sanest way for now.

Current developer & maintainer: Vincent Hugot.