In the first example on the jkwik site, there is a generator that potentially generates a large number of values for "divisible by 3":
@Property
boolean every_third_element_starts_with_Fizz(@ForAll("divisibleBy3") int i) {
return fizzBuzz().get(i - 1).startsWith("Fizz");
}
@Provide
Arbitrary<Integer> divisibleBy3() {
return Arbitraries.integers().between(1, 100).filter(i -> i % 3 == 0);
}
Will jqwik run the property test for all possible values, or does it select values from this list? If it's the secon case, how does it select?
In this case jqwik will generate all possible values because there are only 100 candidates to consider and 100 is smaller than the default number of generated values, which is 1000. Since there is also filtering taking place, only the 33 numbers below 100 that are divisible by 3 are being generated.
In cases where a value's possible range cannot be fully covered, values are chosen