Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Releases: jcornaz/kwik

0.5.0

29 Mar 16:39
Compare
Choose a tag to compare

Added

Reintroduce core core module that adds all transitive dependencies necessary for property based testing.

Fuzzer

A new module fuzzer has been added. It contains an experimental abstraction layer which is meant to be above the
Generator. (Note that fuzzer-api is transitively added by evaluator and core)

The (existing) Generator is responsible only for generating random value
(without even knowing if it is for testing purposes or not).

A Fuzzer is specialized for property based testing.
It contains a Generator, a Simplifier and a list of guarantees
that must be satisfied at least once during evaluation.

  • A new function forAny is provided to run test using Fuzzer instead of Generator in module evaluator.
    In case of property falsification, this function will simplify the input to the simplest input that still falsify the property.

  • Simplifier combination Simplifier.pair(Simplifier, Simplifier) and Simplier.triple(Simplifier, Simplifier, Simplifier)
    Are provided

  • Arbitrary an empty object type that can be used to find Fuzzer factories (regardless of the module they come from)

  • Arbitrary.pair and Arbitrary.triple to combine fuzzers.

Dependencies Updated

  • Kotlin (from 1.3.61 to 1.3.71)

0.4.0

08 Feb 20:08
Compare
Choose a tag to compare

Added

  • Allow to configure default number of iteration via environment variable KWIK_ITERATIONS on JVM and Linux
    (on JVM the system property has precedence over the environment variable)
  • Allow to configure default seed via system property kwik.seed (on JVM) or via environment variable KWIK_SEED on JVM and Linux
    (on JVM the system property has precedence over the environment variable)

0.3.0

24 Jan 22:15
Compare
Choose a tag to compare

Removed (Breaking)

  • Module core. It was an empty module only to provide transitive dependencies to most common used modules.

Added

Migration from 0.2.0

Before updating to 0.3.0 (so using version 0.2.0)

  1. Remove all usage of deprecated members

    • Use Generator.withSamples instead of Generator.samples

    • Use Generator.randomSequence instead of Generator.randoms

  2. Replace dependencies of module core by evaluator and generator-stdlib
    Example with gradle for JVM project:

    dependencies {
        testImplementation("com.github.jcornaz.kwik:kwik-evaluator-jvm:0.2.0")
        testImplementation("com.github.jcornaz.kwik:kwik-generator-stdlib-jvm:0.2.0")
    }

0.3.0-alpha.1

05 Dec 12:12
Compare
Choose a tag to compare
0.3.0-alpha.1 Pre-release
Pre-release

Removed (Breaking)

  • Generator.samples property has been removed.
    Now the generator have to have a probability to generate the edge cases in generate.
    The recommended option when building a generator, is to use withSamples

  • Generator.randoms function has been removed.
    Generator.generate or Generator.randomSequence should be used instead.

Changed

All generators no longer statically provide samples. Instead they have a good probability to generate edge cases.

  • (Breaking binary) withSample now takes a probability argument, and include the samples in the generation

Added

  • ensureAtLeastOne utility in evaluation context,
    that will force property evaluation until a given predicate gets satisfied

Dependencies Updated

  • Kotlin (from 1.3.60 to 1.3.61)

0.2.0

19 Nov 07:05
Compare
Choose a tag to compare

Deprecated

  • samples property in Generator interface. (Samples are about to be included in generation of generate)
    One should use withSamples and frequency instead.

Added

  • andThen operator to make easier building complex generation pipeline
  • frequency combinator, allowing to create a frequency-parametrized generator

Dependencies Updated

  • Kotlin (from 1.3.50 to 1.3.60)

0.2.0-rc.1

18 Sep 19:01
Compare
Choose a tag to compare
0.2.0-rc.1 Pre-release
Pre-release

Changed

  • default max size/length for string,collection and sequence generators set to 50 (instead of 200)

Added

  • sequences generator
  • uuids generator

0.2.0-beta.2

16 Sep 18:43
Compare
Choose a tag to compare
0.2.0-beta.2 Pre-release
Pre-release

Deprecated

  • Method Generator.randoms(Long) the generator should generate single values, not a sequence.

Added

  • (Breaking) method generate(Random): T in interface Generator to generate single value.
  • checkForAll. An alternative to forAll allowing to use assertion (throw in case of error) instead of returning a boolean.
    It can be especially helpful to more descriptive message about what is wrong.
  • Generator.randomSequence extension function to replace the deprecated Generator.randoms(Long): Sequence<T>

0.2.0-beta.1

15 Sep 09:43
Compare
Choose a tag to compare
0.2.0-beta.1 Pre-release
Pre-release

Changed

  • Wrap exceptions thrown by the properties so that a helpful message can be displayed (number of attempts, arguments, etc.)

Dependencies Updated

  • Kotlin (from 1.3.41 to 1.3.50)

0.1.0

28 Jul 13:23
Compare
Choose a tag to compare

Added

  • StringCharSets object with numeric, alphaLowerCase, alphaUpperCase, alpha and alphaNumeric.
    Sets of character to easily configure the string generator.
  • kwik.iterations system property to globally define a default number of iteration.

Modules extracted from core

  • Generator API moved to generator-api module
    (artifacts generator-api-common and generator-api-jvm)
  • Generators for types of the kotlin standard library is moved to generator-stdlib module
    (artifacts generator-stdlib-common and generator-stdlib-jvm)
  • The property evaluation is moved to evaluator
    (artifacts evaluator-common and evaluator-jvm)

Package names changed (Breaking)

The packages have been renamed, and classes/files have been moved to reflect their new module

  • (Breaking) The content com.github.jcornaz.kwik.generator as been moved to com.github.jcornaz.kwik.generator.stdlib
  • (Breaking) The content com.github.jcornaz.kwik as been splitted into com.github.jcornaz.kwik.generator.api and com.github.jcornaz.kwik.evaluator

Dependencies Updated

  • Kotlin (from 1.3.40 to 1.3.41)

0.1.0-beta.1

01 Jul 16:37
Compare
Choose a tag to compare
0.1.0-beta.1 Pre-release
Pre-release

Added

  • (Breaking) PropertyEvaluationContext available as a type-receiver in property evaluation
  • skipIf function on PropertyEvaluationContext allowing to skip a property evaluation for some specific set of input
  • Few aliases to get common generators:
    • positiveInts, naturalInts, negativeInts and nonZeroInts
    • positiveLongs, naturalLongs, negativeLongs and nonZeroLongs
    • positiveFloats, negativeFloats and nonZeroFloats
    • positiveDoubles, negativeDoubles and nonZeroDoubles
    • nonEmptyStrings and nonBlankStrings
    • nonEmptyLists, nonEmptySets and nonEmptyMaps

Changed

  • Show test details in console only in case of success
  • Improved exception message in case of falsified property (and introduce typed exception FalsifiedPropertyError

Dependencies Updated

  • Kotlin (from 1.3.31 to 1.3.40)