jqwik v1.3.0 Release Notes

Release Date: 2020-05-29 // 3 days ago
  • 🆕 New and Enhanced Features

    ➕ Added user-guide documentation for Lifecycle Hooks

    ➕ Added new statistics report formats: Histogram and NumberRangeHistogram

    👌 Improved shrinking of dependent parameters.

    ➕ Added Arbitraries.ofSuppliers(..) to choose among a set of mutable objects.

    You can now influence the distribution of random number generation:
    👍 All numeric arbitraries now support withDistribution(RandomDistribution)
    0️⃣ to choose between RandomDistribution.biased() (default),
    RandomDistribution.uniform() and RandomDistribution.gaussian(borderSigma).

    0️⃣ Default number generation has now a much higher bias towards numbers
    that are closer to the shrinking target of a number range.

    Using a faster implementation of java.util.Random under the hood

    Massively improved and enhanced generation of edge cases

    Edge Cases Mode is now being reported per property

    ➕ Added StringArbitrary.withChars(Arbitrary<Character> characterArbitrary)

    ➕ Added CharacterArbitrary.with(Arbitrary<Character> characterArbitrary)


    • Arbitraries.nothing()
    • Arbitrary.collect(Predicate<List<T>> until)
    • Arbitrary.sample()
    • Arbitrary.sampleStream()
    • Arbitrary.injectDuplicates(double duplicateProbability)
    • Arbitrary.tuple1()
    • Arbitrary.tuple2()
    • Arbitrary.tuple3()
    • Arbitrary.tuple4()
    • Annotation net.jqwik.api.From
    • Class net.jqwik.api.Functions
    • Class net.jqwik.api.arbitraries.FunctionArbitrary

    💥 Breaking Changes

    Decimal Generation: min and max values are now rejected if they have more decimal places
    than the generator's scale allows.

    Decimal Shrinking: Values without decimal places are no longer preferred while shrinking.

    ✂ Removed deprecated APIs

    • Arbitrary.withSamples(T... samples)
    • RandomGenerator.withSamples(T... samples)
    • TryLifecycleContext.propertyContext()

    - net.jqwik.api.Statistics: Replaced by net.jqwik.api.statistics.Statistics

    Set most public methods of RandomGenerator to API status INTERNAL

    Set Arbitrary.exhaustive() to API status INTERNAL

    Set ExhaustiveGenerator and all its methods to API status INTERNAL

    The evaluation order of SkipExecutionHook hooks can no longer be influenced.

    🐛 Bug Fixes

    An OutOfMemoryError will go through to the top. Fix for
    bug report from jqwik-spring.

    Arbitraries.of(listOfValues) would break when list does not allow null values.

    0️⃣ Generated functions now handle default methods correctly

Previous changes from v1.2.7

  • 🆕 New and Enhanced Features

    BigDecimalArbitrary now allows specifying excluded min and max values:

    • BigDecimalArbitrary.between(BigDecimal min, boolean minIncluded, BigDecimal max, boolean maxIncluded)
    • BigDecimalArbitrary.lessThan(BigDecimal max)

    - BigDecimalArbitrary.greaterThan(BigDecimal min)

    Annotation @BigRange has two new optional attributes minIncluded and maxIncluded

    DoubleArbitrary now allows specifying excluded min and max values:

    • DoubleArbitrary.between(double min, boolean minIncluded, double max, boolean maxIncluded)
    • DoubleArbitrary.lessThan(double max)

    - DoubleArbitrary.greaterThan(double min)

    Annotation @DoubleRange has two new optional attributes minIncluded and maxIncluded

    FloatArbitrary now allows specifying excluded min and max values:

    • FloatArbitrary.between(float min, boolean minIncluded, float max, boolean maxIncluded)
    • FloatArbitrary.lessThan(float max)

    - FloatArbitrary.greaterThan(float min)

    Annotation @DoubleRange has two new optional attributes minIncluded and maxIncluded

    ✅ Warning about JUnit annotations only shows up when test container class has
    jqwik property or example methods.

    ⬆️ Upgrade to JUnit Platform 1.6.2

    💥 Breaking Changes

    • Minor changes to yet undocumented Lifecycle Hooks API