Google seems to show a number of QuickCheck and QuickCheck-like implementations for OCaml. Is there consensus on which one works best? (I’d rather not try all of them in sequence…)
For unit testing, I’ve been meaning to try out http://michipili.github.io/broken/ --I like how minimalistic it is, feels like it strips out as much boilerplate as possible.
I have yet to find a good article about or easy-to-follow example of how to set it up, but I think the technique has potential.
Maybe someone who has a better grip on this tooling can elaborate a bit.
ocaml-bun is intended for nice management of afl-fuzz/crowbar workflows, so I’d recommend looking at Crowbar first
the Crowbar repository itself is lacking in documentation but has some examples from which it’s possible to do a bit of divination around how the workflow goes. I wrote a bit about using it here, and the tests it refers to are on github . Crowbar isn’t yet released and the API is in flux; some breaking changes got merged a few days ago, so if you want to try any existing tests out (including most of those in the Crowbar repository’s examples directory) you’ll want to check out commit cffd7df0ab1daa9109220c329eba871c0759db98 .
I’m interested myself in existing examples of OCaml projects with generative or property-based tests, regardless of the specific framework used.
I think it would be a shame to claim that any of these constitute particularly well-written examples of QCheck usage, but maybe there are parts that can be copy-pasted from.
@yomimono I think fpath and astring’s test suites already got treatment from @stedolan but you are welcome to torture Gg’s test suite (which uses it’s own property and generative testing framework I never polished to release).