You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If fc.statistics returned the distribution of classifications in addition to printing it, I'd have a straightforward way to property test my arbitraries. Would be nice to also have the number of skipped generated values.
Motivation
I've been trying my hand at building custom arbitraries, and noting that bugs can definitely sneak into those. In particular, I'm concerned that the arbitraries might not be well distributed across the input space, and manually printing out statistics is a bit of a pain. So my property tests could be passing but not really finding edge cases (e.g. imagine if my custom X generator just always returns empty X for some reason). Even if I get it right, someone else could introduce a regression and we could silently lose coverage that we thought we had. So I'm looking for ways to property test the arbitraries themselves.
Example
fc.assert(fc.property(_,()=>{constresults=fc.statistics(fc.string(),// source arbitrary(v)=>`${v.length} characters`,// classifier{numRuns: 100_000},// extra parameters);returnresults.classes['1 characters']>0;}));
Thanks for considering!
The text was updated successfully, but these errors were encountered:
It is related but I think my request is more focused. Just return the data that is already there :). No need for you to come up with any new APIs for labeling properties or asserting on statistical significance. Others can experiment with those using the data returned from this existing API.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
💡 Idea
If fc.statistics returned the distribution of classifications in addition to printing it, I'd have a straightforward way to property test my arbitraries. Would be nice to also have the number of skipped generated values.
Motivation
I've been trying my hand at building custom arbitraries, and noting that bugs can definitely sneak into those. In particular, I'm concerned that the arbitraries might not be well distributed across the input space, and manually printing out statistics is a bit of a pain. So my property tests could be passing but not really finding edge cases (e.g. imagine if my custom X generator just always returns empty X for some reason). Even if I get it right, someone else could introduce a regression and we could silently lose coverage that we thought we had. So I'm looking for ways to property test the arbitraries themselves.
Example
Thanks for considering!
The text was updated successfully, but these errors were encountered: