Bisect_ppx — ReasonML code coverage with nice HTML reports


Bisect_ppx is a coverage tool for OCaml and ReasonML. It helps you to see which parts of your code are not tested:


Note: the GIF shows usage with Dune and OCaml syntax — this is only because I don’t have a “big” project in Reason syntax handy for a demonstration :slight_smile:

Bisect has recently had its 2.0.0 release, which brought the project to BuckleScript. You can now install it from npm and use it on Node or in browsers:

npm install bisect_ppx

And, as before, the native version is installable by esy:

"devDependencies": {
  "@opam/bisect_ppx": "^2.0.0"

There are starter repos available for each build system and environment, which you can refer to for figuring out any needed boilerplate — see the links and instructions in the Bisect_ppx README.

In addition to generating tidy HTML reports, Bisect_ppx integrates with CI and online coverage services. Currently, you can send reports from Travis and CircleCI to Coveralls and Codecov. The list of integrations is likely to grow over time.

Happy testing!