Here is my assessment of the OCaml test frameworks I found easily:
OUnit ( http://www.yqcomputer.com/
Only supports xUnit style testing. Rather simplistic interface.
Doesn't match the features and convenience of my testing framework.
TestSimple ( http://www.yqcomputer.com/
Seems to be a very simplistic assertion based (like XUnit) testing
framework (refers to some Perl testing framework that I'm not
familiar with). Output is TAP conformant, which might be a minor
advantage (e.g. if you wish to put test results on a web page, for
example). Otherwise doesn't match the functionality and convenience of
my testing framework.
Conclusion: Inferior to my SML UnitTest framework.
Fort ( http://www.yqcomputer.com/
A simple assertion based testing framework. Supports some test
outcomes (notably expected failures and unexpected passes), which have
been on my TODO list (easy to do). Otherwise doesn't match the
functionality and convenience of my testing framework.
OCaml-Reins / QuickCheck (https://sourceforge.net/projects/ocaml-reins/):
Supports QuickCheck style testing. A brief look would suggest that it
uses modules (functors) to build generators. This is very verbose.
Also seems to require separate registration (listing) of test cases.
Generally seems rather verbose. Doesn't match the features and
convenience of my testing framework.
Here are some features of my testing framework:
- Supports xUnit style assertion based testing:
- Framework provides basic assertion functions.
- Assertions can produce pretty printed output. For example, the
equality assertion prints out the values that failed the equality test.
- setUp/tearDown like functionality is supported through my Extended
Basis library (no need to have it in the test framework).
- Supports QuickCheck style test:
- Generic Arbitrary random value generators can be used to implement
default test data generators concisely.
- RandomGen combinators can be used to implement customized data
generators when needed.
- Generic Pretty printing is used to print out counter examples.
- Generic Shrinking is used to minimize counter examples.
- Supports collection of data during testing.
- Designed for non-interactive testing, but can also be used from a REPL.
- Interface is designed for concise specification of tests:
- The user is not required to provide a title for each test.
- Tests are identified by an implicit index number.
- Failed test output includes a pretty printed stack trace, which
usually further helps to identify the test.
- There is no need to separately list or register tests.
- The user can easily specify new shorthand procedures for specifying