-
Notifications
You must be signed in to change notification settings - Fork 8
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
Create generator and such-that max retries #28
Comments
Hi, thanks for the detailed report! Definitely open to making this configurable, do you happen to know which |
Hello! Thanks for opening the possibility. In my use case, the If you are comfortable with adding me as a contributor, I can open a PR with a suggestion of change and we can advance to a final solution from there. What do you think? |
A PR would be appreciated, thanks! for implementation, I like the idea of the fourth argument overload to |
Hello! Opened #29 |
Context
A common exception when using a
Schema
to generate inputs withschema-generators
is theCouldn't satisfy such-that predicate after 10 tries.
.This is more common for complex schemas with several conditions, and even with targeted generators sometimes a "not so good" generator can cause flakiness to tests when you are using
schema
to generate inputs.Issues
It is understandable the suggested approach to create a specific generator for each use case as suggested here #5. There is a implicit downside to this approach which is maintenance of the generator and bug smashing during flakiness of tests.
A developed target generator for a complex defined Schema usually is not a great property tester because developers have tendencies to test the happy path and known paths, this behavior is translated into generators which create only small subsets of the property testing domain.
There is a trade-off between number of retries and domain specific generators for a Schema, such as processing power, test speed, domain property coverage, flakiness.
These trade-offs (and probably others not described here) should be weighted by the development team when deciding which approach to follow to create a test suite for their domain.
Suggestion
Allow targeted generators (as the best option suggested by #5) but also allow to configure such-that max-retries through a Dynamic Var, a function overload on generator, or another option we set fit to allow such feature to be available to development teams.
The text was updated successfully, but these errors were encountered: