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

Add a generic way to override property parameters (and defaults) from the system properties #337

Open
vlsi opened this issue May 19, 2022 · 0 comments

Comments

@vlsi
Copy link
Contributor

vlsi commented May 19, 2022

Testing Problem

"set property duration from a command line" (see #336)
"override a specific seed with RANDOM when running in CI" (see #149)

Suggested Solution

Support properties like

  • jqwik.property.$className.$methodName.$propertyName=$value (a special value would likely be needed for reverting the value to DEFAULT)

An alternative syntax could be:

  • jqwik.property.$propertyName.$className.$methodName=$value

An order like that would simplify setting the property values "at class level", "for all classes" in the same syntax" ($propertyName could be tries, seed, etc):

  • jqwik.property.$propertyName.$className.$methodName=$value -- method-specific value
  • jqwik.property.$propertyName.$className=$value -- for all methods in class
  • jqwik.property.$propertyName=$value -- default for all classes

Then the users could override property configuration from the command line (e.g. to ensure CI uses RANDOM seeds for a specific set of properties), users could configure CI jobs with different test durations

I'm not sure there's a need to support "fetch default values from something like jqwik.defaultProperty.properyName=$value" yet.
For instance, I could easily imagine that users might want to have an example property with a single iteration, so asking jqwik to "use random seeds for ALL the properties" looks awkward to me.

Discussion

The following issues seem relevant: #145, #149

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

No branches or pull requests

2 participants