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

Track Discarded Test Cases #38

Closed
moodmosaic opened this issue Oct 30, 2024 · 1 comment
Closed

Track Discarded Test Cases #38

moodmosaic opened this issue Oct 30, 2024 · 1 comment

Comments

@moodmosaic
Copy link
Member

In property-based testing, tools like QuickCheck (QC) and Hedgehog (HH) discard test cases that don't meet certain preconditions, and they track these discards to provide feedback on the test generators.

Currently, rendezvous (RV) doesn't track when test cases are discarded due to unmet preconditions. This makes it hard to know if our preconditions are too restrictive or if our generators need tweaking (specially when using custom ones via #7).

Example from #37:

(define-public (test-slice-list-bool (seq (list 127 bool)) (skip int) (n int))
  (if
    ;; Early return if the input is invalid.
    (or
      (not (and (<= 0 n) (<= n 127)))
      (not (and (<= 0 skip) (<= skip 127))))
    (ok true)
    ;; Rest of the test...
  ))

In this test, we return early if the inputs don't meet the preconditions, effectively discarding the test case. But we have no way of knowing how often this happens.

It would be helpful if RV could track and report discarded test cases, similar to how guard works in Hedgehog (example 1, example 2, example 3).

@moodmosaic
Copy link
Member Author

Resolved by #40.

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

No branches or pull requests

1 participant