Let's discuss and figure out some aspects of the new Jqwik 2 API.
Jqwik 2 will - in some areas - have a different or re-worked API from jqwik 1. It's not going to be backwards-compatible. Nevertheless, it shouldn't be different just for the sake of being different.
Many of the implementation challenges for Jqwik 2 have already been successfully tackled in a proof of concept, but the API is open for discussion.
net.jqwik2
to allow Jqwik 1 and 2 side-by-side for easier migration.Unlike Jqwik 1 version 2's core will be independent from any concrete testing framework. Thus it can be used from anywhere, e.g. JUnit Jupiter, TestNG or Spock.
In addition, there will be a JUnit Platform engine, which provides the same lifecycle support and tight IDE integration as Jqwik 1.
Other considered modules:
See core module.
Provide all necessary annotations to use Jqwik 2 just like Jqwik 1.
Stick to Jqwik 1 names where reasonable, and deviate where necessary.
Provide extension with lifecycle hooks for property validation and replay of failed samples
Hook into Jupiter logging and reporting
Use JUnit Platform configuration
Discussion about specific API questions is happening in issues
Open discussions are:
Arbitrary: A composable abstraction of arbitrary values of a given type. An arbitrary includes all constraints that reduce the set of all possible values.
Property: The four main aspects of a property are...
Property Validation: Running a property's code under test with samples that comply with the preconditions. Validation is successful if invariants and postconditions hold in all runs. Statistical Validation can weaken the "all runs" rule by requiring only a certain percentage of runs to comply with invariants.
Sample: The concrete set of values used in one try. The sample must follow all preconditions.
Try: A single execution of a property with a specific set of test data.