After Failure Handling Redone
New and Enhanced Features
-
Complete Rework of after-failure handling:
AfterFailureMode.SAMPLE_FIRST
andAfterFailureMode.SAMPLE_ONLY
no longer depends on serializability of generated parameters.- If random seed is manually changed after a failing test run using
Property.seed=<new random seed>
the configured after-failure-mode does not apply for the next test run. SAMPLE_FIRST
andSAMPLE_ONLY
now also work for data-driven properties and exhaustive generation.
I recommend now to useSAMPLE_FIRST
as
default configuration value for most projects.
-
Added
PropertyDefaults.maxDiscardRatio
-
Added two Kotlin convenience functions:
fun <T> frequency(vararg frequencies: Pair<Int, T>)
fun <T> frequencyOf(vararg frequencies: Pair<Int, Arbitrary<out T>>)
-
Maximum size of generated collections and arrays is now generated regularly, if no size distribution is specified
Breaking Changes
-
Parameter annotations on array types (e.g.
@WithNull String[]
)
are no longer applied to the component type. -
The jqwik database no longer stores test run data for succeeding tests and properties.
This means that the file.jqwik-database
in now much smaller in most cases.
Bug Fixes
-
Using
@WithNull
on primitive array types no longer leads to anIllegalArgumentException
.
See #270. -
Generic array types in parameters can now be properly resolved
-
After-failure handling now (hopefully) works as expected