-
Notifications
You must be signed in to change notification settings - Fork 123
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
Provide a way to check the mean of distribution of test cases' labels #409
Comments
This sounds like a reasonable thing to want indeed. However, before we can discuss details of combinator design etc. I would be really grateful for a tiny example right here that makes it crystal clear what you want to achieve. |
Definitely! As mentioned in the issue this need arose while working on some cryptographic protocol for building "small" certificates through sampling of an initial "large" set. Here is some code sketching what I would like to be able to write, glossing over the details of what type of numbers are to be used:
The idea is that I should be able to attach some kind of Is this helpful? |
Perfect, that's exactly what I was looking for. The issue I foresee here is that if we want to fail a test the way we do with insufficient coverage we need to know what kind of distribution we are dealing with. In the case of boolean yes-no coverage that's easy - it's always a binomial distribution. That fact makes it possible to answer the question "is the coverage higher than X% with Y% confidence?" (Y defaults to something very close to 100% to make sure that things aren't flaky). With means this becomes much more tricky. Firstly, I don't think it would be sufficient to specify "I want the mean to be X" but rather "I want the mean to be X +- Z" and then to answer the question "is this true with a confidence of at least Y%" one would probably need to know more about the distribution (or assumed distribution?) of test cases. |
Defining the expected distribution makes sense, of course. Perhaps that's something relatively easy to provide as an argument to the |
cover
,coverTable
andcheckCoverage
provide ways to target some specific distribution of test cases, and fail the test if this target is not reached within some confidence interval.I would like to write a
Property
that expresses some requirement about the mean of the distribution of test cases. This property provides some context on what I am trying to achieve. In this particular case I would like to test the mean ofretryCount
property of the test cases to be 2.The text was updated successfully, but these errors were encountered: