Bam - Property-Based Testing Library for OCaml

Overview

Bam is an OCaml library designed for writing property-based tests. It simplifies the process of defining and using generators for tests, offering a monad-like structure that integrates seamlessly with shrinking strategies. This design aims to make shrinking both predictable and effective, thereby enhancing the debugging experience.

Key Features

Installation

With opam

opam install bam tezt-bam

Usage

A simple test can be run as follows:

open Tezt_bam

let register () =
  let gen = Std.int () in
  let property _x = Ok () in
  Pbt.register ~__FILE__ ~title:"Simple example of bam" ~tags:["bam"; "simple"]
    ~gen ~property ()	

More examples can be found here.

License

License: MIT