Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage with bisect_ppx #205

Open
vch9 opened this issue Dec 3, 2021 · 2 comments · May be fixed by #206
Open

Coverage with bisect_ppx #205

vch9 opened this issue Dec 3, 2021 · 2 comments · May be fixed by #206

Comments

@vch9
Copy link
Contributor

vch9 commented Dec 3, 2021

As we are adding tests thanks to @jmid, we could add bisect_ppx to produce a coverage report.

@vch9 vch9 linked a pull request Dec 3, 2021 that will close this issue
@jmid
Copy link
Collaborator

jmid commented Dec 22, 2021

Getting an idea of our coverage would be nice!

A few thoughts:

  • Have you tried running Coverage report with bisect_ppx #206 to see how bad it is? 😅
  • I was wondering how we could bring it actively into play - rather than just carry the instrumentation lines around:
    • a CI-badge reporting the percentage in the README?
    • a CI alarm that triggers if a PR decreases coverage? (could be useful to catch PRs without tests - but potentially annoying...)
    • ...
  • Finally, if we're going to measure how well our testsuite is doing it would be nice to rebase and squash the test PRs from the fall (sans the shrink logging for a start). I'll see if I can find the time...

@vch9
Copy link
Contributor Author

vch9 commented Dec 22, 2021

Have you tried running Coverage report with bisect_ppx #206 to see how bad it is? sweat_smile

It's not that bad! A checkout to a commit 6 months ago would show a way funnier percentage :).

✦8 Ψ bisect-ppx-report summary --per-file                                 
  0.00 %      0/0      src/QCheck_runner.ml
 78.57 %     22/28     src/alcotest/QCheck_alcotest.ml
 63.93 %    927/1450   src/core/QCheck.ml
 67.21 %    859/1278   src/core/QCheck2.ml
 12.50 %     20/160    src/ounit/QCheck_ounit.ml
100.00 %      2/2      src/ppx_deriving_qcheck/QCheck_generators.ml
 87.50 %      7/8      src/ppx_deriving_qcheck/args.ml
 88.89 %      8/9      src/ppx_deriving_qcheck/attributes.ml
 96.33 %    236/245    src/ppx_deriving_qcheck/ppx_deriving_qcheck.ml
100.00 %     53/53     src/ppx_deriving_qcheck/tuple.ml
 64.87 %    181/279    src/runner/QCheck_base_runner.ml
 65.92 %   2315/3512   Project coverage

I was wondering how we could bring it actively into play - rather than just carry the instrumentation lines around:

We can have a badge in the README yes, we also can have a diff percentage in each PR. I also think an alarm when its decreasing will be annoying, the only alarm I'd think would be useful is to detect loss covered lines, but that's practically impossible to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants