|
![](https://seccdn.libravatar.org/avatar/dcfe7af74d8d03d1a0ebd18962b3b8f18e13cfb21df46c214faa00e234336c40?s=16&d=retro) |
1d62328 |
# ocaml-bisect-ppx
|
|
![](https://seccdn.libravatar.org/avatar/dcfe7af74d8d03d1a0ebd18962b3b8f18e13cfb21df46c214faa00e234336c40?s=16&d=retro) |
1d62328 |
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
[`Bisect_ppx`](https://aantron.github.io/bisect_ppx/) is a code coverage tool
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
for OCaml. It helps you test thoroughly by showing which parts of your code
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
are *not* tested. It is a small preprocessor that inserts instrumentation at
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
places in your code, such as if-then-else and match expressions. After you
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
run tests, `Bisect_ppx` gives a nice HTML report showing which places were
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
visited and which were missed.
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
Usage is simple - add package `bisect_ppx` when building tests, run your
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
tests, then run the `Bisect_ppx` report tool on the generated visitation
|
|
![](https://seccdn.libravatar.org/avatar/258caf5973a37959eeea9164bfc32d49b0634d0792e85fce1f5acf0430f05ba2?s=16&d=retro) |
eff483a |
files.
|