A code coverage tool for OCaml and ReScript that instruments code to show what's not tested.
Bisect_ppx is a code coverage tool for OCaml and ReScript that instruments source code during compilation to track which parts are executed during tests. It helps developers identify untested code by generating detailed HTML reports or terminal summaries after test runs.
OCaml and ReScript developers who want to measure test coverage in their projects, especially those using build systems like Dune, esy, or ReScript's toolchain.
Developers choose Bisect_ppx because it provides precise expression-level coverage (not just line coverage), integrates with multiple build systems and CI services, and supports both native OCaml and JavaScript targets through ReScript and Js_of_ocaml.
Code coverage for OCaml and ReScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works with Dune, esy, ReScript, Js_of_ocaml, Ocamlbuild, and OASIS, providing versatile support for different OCaml and ReScript project setups, as detailed in the separate usage sections.
Tracks coverage at the expression level, not just lines, offering more accurate data than line-based tools, which is highlighted in the key features and demo.
Directly sends reports to Coveralls and Codecov from Travis, CircleCI, and GitHub Actions, with example scripts and environment variables provided in the 'Sending to Coveralls and Codecov' section.
Allows excluding code using [@coverage off] attributes and file patterns via PPX flags, giving fine-grained control over coverage analysis, as explained in the 'Controlling coverage' section.
Supports ReScript projects and JavaScript runtimes via Js_of_ocaml, enabling coverage testing in browser and Node.js environments, with dedicated ReScript and Js_of_ocaml usage guides.
If pre-built binaries are missing, it automatically falls back to building from source with esy, which can take minutes and requires esy installation, adding setup time and complexity for ReScript projects.
Requires manual instrumentation flags in build files (e.g., in dune or bsconfig.json) and careful exclusion of test files, which can be error-prone and cumbersome for larger or multi-target projects.
When sending reports to services like Coveralls, data is downgraded to line coverage, losing the expression-level accuracy of HTML reports, as admitted in the CI integration section.