Skip to content

Releases: jqwik-team/jqwik

Stabilizing 1.5.x

27 Aug 12:53
Compare
Choose a tag to compare

New and Enhanced Features

  • You can now add footnotes to failure reports

  • Added StatisticsReport.onFailureOnly() to suppress statistics reporting
    for properties that do not fail.

  • Shrinking across several for-all parameters has been improved.

  • The Web module now supports
    web domain name generation.

  • The Time module now supports the generation of java.time.OffsetDateTime instances.

Breaking Changes

  • Properties with single try (aka examples) with at least one @ForAll parameter will now
    produce a test report even if they succeed.
    See #217.

Bug Fixes

  • Fixed edge cases performance problem.
    See #214

Builders Overhauled

10 Aug 14:42
Compare
Choose a tag to compare

New and Enhanced Features

  • Added default method DomainContext.initialize(PropertyLifecycleContext) which
    can be overridden if domain context implementations need access to the property context.

  • Added StringArbitrary.repeatChars(double repeatProbability)

  • Added Arbitrary.optional(double presenceProbability)

  • Improved shrinking performance of combinator-based arbitraries

  • Added net.jqwik.api.Builders
    as replacement for the now deprecated net.jqwik.api.Combinators.withBuilder(..) API.
    Here's the relevant section in the user guide.

  • Progress on generation of DateTimes:
    Objects of type java.time.Instant can now be generated by default.

  • FloatArbitrary and DoubleArbitrary can now
    generate special values on demand.

Breaking Changes

  • Generated strings will no longer intentionally generate duplicate characters
    by default. You now have to tell it to do so.

  • Methods Combinators.withBuilder(builderSupplier) and
    Combinators.withBuilder(arbitrary) are now deprecated.

Bug Fixes

Influence Distribution of Container Size

09 Jul 12:30
Compare
Choose a tag to compare

New and Enhanced Features

  • You can now influence the random distribution of
    the size of generated multi-value containers
    (sets, lists, arrays, streams, iterators and maps).

  • You can now influence the random distribution of
    the size of generated strings.

  • All container-based arbitraries (e.g. List, Sets, Strings) now generate containers
    without duplicated elements with a higher probability even when they have many elements.

  • String arbitraries now generate duplicate chars and series of chars with a higher probability.

  • Added CharacterArbitrary.numeric() and CharacterArbitrary.alpha().

Breaking Changes

  • ActionSequenceArbitrary no longer extends SizableArbitrary.

  • ActionSequenceArbitrary.ofMinSize() and ActionSequenceArbitrary.ofMaxSize()
    is now deprecated.

  • CharacterArbitrary.digit() is now deprecated.

Bug Fixes

  • Module name now correctly set for testing, web and time modules.
    See #201.

  • No longer throwing ConcurrentModificationException when using sample() within another generator.
    This happened in Java >= 11 only.
    See #205

Implicit Flat Mapping and new DomainContextBase

25 Jun 06:52
Compare
Choose a tag to compare

New and Enhanced Features

Breaking Changes

  • Removed leapYears(boolean withLeapyear) from all date generating arbitraries.

  • Changed Arbitrary<T> Arbitraries.oneOf(List<T> choices) to
    Arbitrary<T> Arbitraries.oneOf(Collection<? extends T> choices)

Bug Fixes

  • Fixed bug in edge case generation:
    #180

  • Fixed bug when running inner tests of an extended test container:
    #179

  • Fixed bug in Tuple.toString():
    #187

Memory Leak and DateTimes

30 Mar 06:39
Compare
Choose a tag to compare

New and Enhanced Features

Breaking Changes

  • Trying to add a numerical edge case that is outside the arbitrary's
    allowed range will now throw an IllegalArgumentException.

Bug Fixes

  • Fixed memory leakage introduced in 1.5.0.

  • Shrinking of flat mapped values would sometimes never end.

Performance is Everything

20 Feb 11:35
Compare
Choose a tag to compare

This came shortly after 1.4.0 because 1.4.0 introduce severe performance problems for some users.

New and Enhanced Features

  • Added constraint annotation @NotBlank for String parameters

  • Generated email addresses get a few more edge cases

Breaking Changes

  • Removed Arbitrary.unique() which had been deprecated in 1.4.0

  • Removed annotation @Unique which had been deprecated in 1.4.0

  • Removed Arbitraries.constant(..) which had been deprecated in 1.3.2

Bug Fixes

  • Fixed degraded generation performance
    introduced in version 1.4.0.

  • Arbitrary.withoutEdgeCases() did not really get rid of all edge case generation.
    Now it does.

  • Some arbitrary types, e.g. Arbitraries.lazyOf() could not be used in sampling.
    Now all should work.

  • Bounded shrinking could previously result in an OutsideJqwikException.

Edge Cases and Uniqueness Revisited. Emails and Dates.

10 Feb 15:46
Compare
Choose a tag to compare

New and Enhanced Features

  • Upgrade to JUnit Platform 1.7.1

  • Using @Property(edgeCases = NONE) will now also suppress the generation of
    edge cases in embedded arbitraries.

  • You now have the capability to configure an
    arbitrary's edge case generation.

  • There is a new annotation attribute @Property.whenSeedFixed and a new
    configuration parameter
    jqwik.seeds.whenfixed
    to warn or even fail when a property has been given a fixed random seed.
    See this issued for more details.
    Many thanks to osi for this contribution.

  • jqwik's approach to specify uniqueness of generated objects has been completely revamped:

    • Arbitrary.unique() and the annotation @Unique are now deprecated and will
      be removed in version 1.5.
    • Uniqueness constraints
      are now handled by the elements' container.
    • The new annotation to require uniqueness
      is called @UniqueElements and applied to the container's type.
  • Arbitraries modified through Arbitrary.unique(), which is deprecated anyway,
    no longer generate edge cases. This is actually a bug fix since the
    generated edge were not considered for uniqueness.

  • There's a new jqwik module jqwik-time
    which simplifies the generation of dates (and times in a future release).
    Many thanks to zinki97 for this contribution.

  • There's a new jqwik module jqwik-web
    which is currently home of email addresses generation.

  • Configuration parameters are now loaded via JUnit's
    Configuration Parameters mechanism.
    Parameters specified in jqwik.properties continue to work, but are considered deprecated.
    Log messages will be emitted for any used properties with their new name.
    Some parameter names have also changed.
    Many thanks to osi for this contribution.

  • Using internal Kotlin methods as properties will now produce the correct name
    as seen in the Kotlin source code.

  • The User Guide has been restructured.

  • There will now be a warning log entry when a property with more than 1 try has no
    '@forall' parameters.

  • Promoted APIs from EXPERIMENTAL to MAINTAINED

    • Mostly everything in package net.jqwik.api.lifecycle
    • Method Arbitrary.dontShrink()
    • Method Combinators.CombinableBuilder.inSetter(..)
    • Class PropertyDefaults
    • Class Reporter
    • Class SampleReportingFormat
    • Method Tuple.of()
    • Method Tuple.empty()
    • Method BigDecimalArbitrary.shrinkTowards(..)
    • Method BigIntegerArbitrary.shrinkTowards(..)
    • Method ByteArbitrary.shrinkTowards(..)
    • Method DoubleArbitrary.shrinkTowards(..)
    • Method FloatArbitrary.shrinkTowards(..)
    • Method IntegerArbitrary.shrinkTowards(..)
    • Method LongArbitrary.shrinkTowards(..)
    • Method ShortArbitrary.shrinkTowards(..)
    • Method SetArbitrary.mapEach(..)
    • Method SetArbitrary.flatMapEach(..)
    • Method ListArbitrary.mapEach(..)
    • Method ListArbitrary.flatMapEach(..)
    • Method ActionSequence.withInvariant(..)
    • Method Statistics.coverage(..)
    • Method StatisticsCollector.coverage(..)
    • Class StatisticsCoverage
    • Class StatisticsEntry

Breaking Changes

  • Arbitraries.emails() has been moved to net.jqwik.web.api.Web.emails() in new
    Web module.

  • @net.jqwik.api.constraints.Email annotation has been moved to
    @net.jqwik.web.api.Email in new
    Web module.

  • Parameters annotated with @Email will by default only generate
    "standard" email addresses.

  • Removed deprecated APIs

    • Arbitrary.samples(..)
    • Interface FalsificationResult
    • SampleReportingFormat.reportJavaBean(..)
    • Shrinkable.shrink(Falsifier<T> falsifier)
    • Interface ShrinkingSequence
    • CharacterArbitary.with(Arbitrary<Character> characterArbitrary)
    • StringArbitary.withChars(Arbitrary<Character> characterArbitrary)
  • Unconstrained wildcards are no longer handled in a special way
    but just like unconstrained type variables.

  • Arbitrary.array(..) now returns ArrayArbitrary instead of StreamableArbitrary

Bug Fixes

  • Fixed bug that could lead to strange edge case generation behaviour
    when Arbitrary.edgeCases(edgeCasesConfig) was used.

Some Bugs Fixed

04 Dec 16:01
Compare
Choose a tag to compare

New and Enhanced Features

  • Introduced JavaBeanReportingFormat for simpler and configurable reporting
    of Java beans.

Breaking Changes

  • SampleReportingFormat.reportJavaBean(..) has been deprecated.
    Will be removed in version 1.4.0.

Bug Fixes

  • Arbitraries.lazy() did not allow exhaustive generation but does now.

  • SampleReportingFormat.reportJavaBean(..) can now handle methods named
    is or get.

  • SampleReportingFormat.reportJavaBean(..) can now handle properties
    that return Optional<T>.

Stabilization and Enhanced Email Generation

01 Dec 07:47
Compare
Choose a tag to compare

New and Enhanced Features

  • Generating email addresses
    has now configuration options.

  • Generated email addresses now
    have fewer edge cases.

  • Added constraint annotation
    @Email
    for generating valid email addresses.

  • Experimental support for
    changing an arbitrary's edge cases.

  • Constraint annotation @StringLength now works for any arbitrary that generates a String.

  • Range annotations (@Byte|Short|Int|Long|Float|Double|BigRange) do work now when applied
    to any arbitrary that generates the appropriate numeric type.

Breaking Changes

  • Email arbitrary no longer generates domain hosts without top level domain

Bug Fixes

Email Generation

12 Nov 09:58
Compare
Choose a tag to compare

New and Enhanced Features

Breaking Changes

  • The distribution of char groups when generating Characters or Strings
    is now weighted by the number of chars in each group so that each possible
    char has the same probability of being generated - except for edge cases.

  • StringArbitrary.withChars(Arbitrary<Character>) was deprecated

  • CharacterArbitrary.with(Arbitrary<Character>) was deprecated

Bug Fixes

No known bugs.