Releases: kotest/kotest
v6.0.0.M1
What's Changed
- Build Config update & enable Configuration Cache by @aSemy in #4062
- Report config-cache errors as warnings by @aSemy in #4068
- remove
@ExperimentalCoroutinesApi
opt-in from no-longer-experimental code by @aSemy in #4070 - Update propagated coroutine annotations by @aSemy in #4071
- Refactor KMP POM rewriting by @aSemy in #4072
- update actions/upload-artifact to v4 by @aSemy in #4083
- remove
@OptIn(ExperimentalStdlibApi::class)
fromstartWith()
by @aSemy in #4082 - Apply publishing conventions to kotest-bom by @aSemy in #4073
- Tidy Range matchers by @aSemy in #4081
- Tidy kotest-common logger by @aSemy in #4080
- Update plugins used to build Kotest Gradle Plugin by @aSemy in #4079
- Disable coroutineTestScope for WasmJs by @osipxd in #4078
- Bump Kotlin to 1.9.24 by @aSemy in #4086
- Suppressing usage of deprecated Kotest functionality by @Kantis in #4087
- add Kotest icon to IDEA config by @aSemy in #4088
- Update GitHub release workflows by @aSemy in #4076
- Remove the non-existent parameter includeEmpty in KDoc of Arb.Companion.map() by @acanda in #4090
- Remove
@ExperimentalStdlibApi
annotation from testCoroutineScheduler by @osipxd in #4075 - multiplatform-plugin-gradle: Fix Gradle invocation on Windows by @OliverO2 in #4096
- Suppressing more internal deprecations by @Kantis in #4093
- Make TestCaseSourceRefTest more stable by @aSemy in #4097
- Workflow: update build reports upload by @aSemy in #4098
- Open up java.base/java.lang to use withEnvironment() with JDK17+ by @OliverO2 in #4100
- Suppress opt-in warnings for experimental KGP features by @aSemy in #4099
- Refactor retry, and retry tests by @aSemy in #4101
- Add
@Deprecated
to overrides ofPrint#print
by @aSemy in #4104 - Test discovery: Make classpath scanning fallback configurable by @OliverO2 in #4017
- Fix testing on GitHub Windows runners by @OliverO2 in #4102
- Use centralized repositories for build by @aSemy in #4110
- Remove TimeMarkCompat / MonotonicTimeSourceCompat / timeInMillis by @aSemy in #4105
- note on Gradle Settings by @bliessens in #4095
- Use test TimeSource in continually tests by @aSemy in #4109
- Fix kotest-framework-multiplatform-plugin-gradle build by @OliverO2 in #4117
- use
measureTimedValue {}
to measure operation durations in Discovery by @aSemy in #4122 - CI: Harmonize master and PR tests by @OliverO2 in #4121
- remove unnecessary inline by @aSemy in #4106
- suppress deprecation warnings in InspectingTest by @aSemy in #4126
- Fix warnings in kotest-assertions-shared by @aSemy in #4127
- suppress deprecation warnings for deprecated
io.kotest.assertions.until.*
utils by @aSemy in #4125 - Document
kotest.framework.discovery.jar.scan.disable
by @sschuberth in #4129 - Stabilize tests on slow runners by @OliverO2 in #4132
- Configure JVM test tasks with same args as main build by @OliverO2 in #4119
- Stabilize GlobalTimeoutTest and EngineTimeoutTest by @aSemy in #4124
- Enable concurrency cancellation in PR test GitHub Action by @aSemy in #4139
- Use test TimeSource in eventually tests by @aSemy in #4114
- Json path array match take3 (#74) by @AlexCue987 in #4118
- Fix flaky tests ContinuallySpec, EventuallySpec by @OliverO2 in #4142
- CI: run Gradle check on all OSes in parallel by @aSemy in #4143
- Making helper classes internal instead, so we don't accidentally miss… by @Kantis in #4140
- CI: Enable Configuration Cache re-use by @aSemy in #4146
- shouldContainJsonKey-partial-match by @AlexCue987 in #4158
- Opt in for K/N workers in test by @aSemy in #4128
- Publish Kotest KMP Gradle Plugin to Maven Central by @aSemy in #4136
- Fix typo in documentation by @G-Basak in #4168
- Suppress deprecated usage of StableIdentifiers by @aSemy in #4169
- Enable remote Gradle Build Cache by @aSemy in #4141
- Add missing annotation to actual declarations by @aSemy in #4165
- suppress deprecation warnings in MatchTest by @aSemy in #4134
- Deprecate implementations of deprecated
SpecExtension.intercept()
by @aSemy in #4166 - Use available virtual time automatically, harmonize time measurement by @OliverO2 in #4149
- Opt in for expect-actual classes by @aSemy in #4164
- commonize shouldCompleteWithin/shouldCompleteBetween/shouldTimeout by @aSemy in #4115
- test_factories.md: include is only supported at the top level of a spec by @jlous in #4150
- Update plugin com.gradle.develocity to v3.17.5 by @renovate in #4156
- Rename 'Test' to 'MultiConfigTest' by @aSemy in #4180
- Add seed to arb test, to avoid flakiness on CI by @aSemy in #4167
- Optimize Kotest framework discovery in Kotest's own tests by @aSemy in #4148
- Optimise parallel test launching test by @aSemy in #4182
- Fix Kotest Gradle Plugin publishing by @aSemy in #4184
- fix-verifier-in-containsExactlyInAnyOrder-take2 (#80) by @AlexCue987 in #4160
- add-similarity-to-contain (#53) by @AlexCue987 in #3939
- Tidy building 'Property test failed for inputs' message by @aSemy in #4185
- Adapt assertion extensions for Collections and Iterables to use bounded types by @hanszt in #3961
- Should be equal to comparing fields should support generics by @AlexCue987 in #4157
- Cleaning stacktraces later by @Kantis in #4051
- add more specific reason to
beEmptyDirectory()
failure message by @aSemy in #4186 - GHA - Cache the Kotest user dir by @aSemy in #4187
- haveElementAt-more-detail-take3 by @AlexCue987 in #4159
- Fix Gradle signing/publish task dependency by @aSemy in #4188
- fix edge case for isStable - when property and function have same name by @AlexCue987 in #4173
- eventually fixed by @mirageoasis in #4018
- Add similarity to haveKeys and haveKey (#47) by @AlexCue987 in #3930
- Optimise PBT seed files by @aSemy in #4183
- Fix contain exactly verifier by @AlexCue987 in #3977
- Move some framework only commons into engine module by @sksamuel in #4189
--continue
publishing by @aSemy in #4191- Create BuildService for collecting dependencies for kotest-bom by @aSemy in #4074
- Avoid use of test types in junit listener by @sksamuel in #3789
- Move some framework only commons into engine module part 2 by @sksamuel in #4192
- Suffix Kotest Gradle Plugin snapshot versions with
-SNAPSHOT
by @aSemy in #4194 - use Dev Publish plugin to test Kotest plugin by @aSemy in #4174
- Removed long deprecated scope names by @sksamuel in #4198
- Move more commons out to the projects that need it by @sksamuel in #4197
- Remove deprecated/relocated Arb reflection utils by @aSemy in h...
v5.9.1
What's Changed
Assertions
- shouldHaveElementAt-more-info by @AlexCue987 in #3985
- shouldExist-more-info (#62) by @AlexCue987 in #3984
- singleElement-more-info by @AlexCue987 in #3983
- singleElement-with-predicate-more-info by @AlexCue987 in #3986
- Add Stacktrace Substring Matching to Throwable Matchers by @neBM in #3998
- Deprecating inspecting. by @Kantis in #4009
- Partial key (#65) by @AlexCue987 in #4013
- fix retry ignore subclass of exception class by @kin4496 in #3955
- Add simplified overloads to shouldMatchEach extensions (#3911) by @gianninia in #3929
- Add an
infix
variant ofshouldNotBeNull
that accepts a block by @sschuberth in #4060
Framework
- Handling generic data classes when determining identifier stability by @Kantis in #4007
- Refactor team city listener to extract the writing methods by @sksamuel in #4053
Property-testing
- Reverted generation of null values in
Arb.list<T?>
due to performance issues by @Kantis in #4023 - Add an Arbitrary to generate whitespace. by @jedesroches in #4030
Docs
- Update blogs.md - matchers for temporal types with tolerance by @AlexCue987 in #4021
- fix broken matcher documentation for dates by @dzappold in #4019
- Correct the explanation of lifecycle hooks in docs by @kohii in #4020
- Fix links for Testcontainers lifecycle section by @gavvvr in #4037
- Add link to write-up about ranges by @AlexCue987 in #4042
- Fix test name comparison in docs by @hoonloper in #4034
Build / CI/CD / Dependency updates
- Add wasmJs publishing to release job by @eygraber in #4010
- chore(deps): update dependency gradle to v8.7 by @renovate in #3958
- add-regression-test-for-performance-degradation by @AlexCue987 in #4027
- Publish androidNative targets by @eygraber in #4031
- Publish watchosDeviceArm64 target by @eygraber in #4032
- fix(deps): update dependency io.mockk:mockk to v1.13.11 by @renovate in #4050
- [Chore] Upgrade to the Develocity plugin to remove build warnings by @pshevche in #4045
New Contributors
- @eygraber made their first contribution in #4010
- @dzappold made their first contribution in #4019
- @kohii made their first contribution in #4020
- @jedesroches made their first contribution in #4030
- @gavvvr made their first contribution in #4037
- @pshevche made their first contribution in #4045
- @hoonloper made their first contribution in #4034
- @neBM made their first contribution in #3998
Full Changelog: v5.9.0...v5.9.1
v5.9.0
New Features
- Support for WebAssembly (the wasmJs target) has been added (#3805)
Breaking Changes
- Support for watchosX86 and iosArm32 targets has been removed (#3805)
Requirements
- Kotlin 1.9.23 and higher
- kotlinx.coroutines 1.8.0 and higher
What's Changed
- Add wasmJs target by @OliverO2 in #3805
- fix(docs): indentation in System Extensions by @craigpastro in #3940
- Change Arb.filterIsInstance() signature to use single type parameter by @kshired in #3943
- Add missing functions to property-arbs docs by @snowe2010 in #3945
- Increasing JVM heap allowance on GitHub by @Kantis in #3948
- Fix JS and Wasm/JS test timeouts, bring back Node.js test output by @OliverO2 in #3953
- add-similarity-to-contains-draft (#42) by @AlexCue987 in #3906
- Update Sonatype snapshot URL by @aSemy in #3956
- Fix json assertions artifact coordinate in docs by @TWiStErRob in #3968
- Create CODE_OF_CONDUCT.md by @sschuberth in #3987
- Restructure Kotlin/JS and Kotlin/JS/Wasm testing, fix #3329 by @OliverO2 in #3954
- Correct Collection Matchers Documentation For
collection.shouldContainAllInAnyOrder()
by @u-ways-e in #3995 - chore(deps): update plugin com.gradle.enterprise to v3.17.2 by @renovate in #3990
- Add kotlin-faker to extensions list by @serpro69 in #3971
- Better assertion failures for containJsonKeyValue by @Kantis in #3949
- fix(deps): update dependency io.github.classgraph:classgraph to v4.8.172 by @renovate in #3957
- Add similarity to contain exactly in any order by @AlexCue987 in #3938
- Fix Arb.list failing within edge cases in case of null values by @oliverblaha in #3982
- chore(deps): update plugin kotlinbinarycompatibilityvalidator to v0.14.0 by @renovate in #3993
- chore(deps): update plugin io.kotest.multiplatform to v5.8.1 by @renovate in #3992
- fixing the kotest autoscan warning message to reference the right property name by @stepanv in #4000
- fix(deps): update dependency io.projectreactor.tools:blockhound to v1.0.9.release by @renovate in #3989
- Allow comparison between empty set and other iterables by @Kantis in #4005
- Moving similarity feature to kotest-assertions-core by @Kantis in #4006
New Contributors
- @craigpastro made their first contribution in #3940
- @snowe2010 made their first contribution in #3945
- @TWiStErRob made their first contribution in #3968
- @u-ways-e made their first contribution in #3995
- @serpro69 made their first contribution in #3971
- @stepanv made their first contribution in #4000
Full Changelog: v5.8.1...v5.9.0
v5.8.1
What's Changed
- Update dependency io.github.classgraph:classgraph to v4.8.164 by @renovate in #3751
- Non-negative/positive
Long
assertions and property testers by @RusticFlare in #3720 - Fix typo in documentation by @tamj0rd2 in #3756
- fixed : rolled back to initial Readme.md by @mirageoasis in #3757
- Add context container to behavior spec by @jcthenerd in #3737
- Fixed display of large ranges by @sksamuel in #3765
- Expose the kotlin coroutineTestScope by @sksamuel in #3769
- Increase maps diff size to 100, allowing for config by @sksamuel in #3767
- Allow display name formatter to return null by @sksamuel in #3764
- CoroutineDispatcher is not a TestDispatcher on JS by @sksamuel in #3766
- Use evals as measure for assumptions by @sksamuel in #3771
- Added tier3 targets #3748 by @sksamuel in #3761
- Add size matchers to typed Kotlin array classes by @obecker in #3773
- Regular file passes the shouldBeEmptyDirectory() assertion by @sksamuel in #3775
- OffsetDateTimeToleranceMatcher (#6) by @AlexCue987 in #3781
- Add FixtureMonkey in third party extensions by @seongahjo in #3782
- Local date time plus or minus by @AlexCue987 in #3779
- Fix orNull with nullProbability=1.0 produce non-nulls by @kshired in #3783
- Fix continually does not work with null values by @kshired in #3786
- cutting docs for 5.8 by @Kantis in #3787
- Support binding properties to specific Arbs when doing reflective binding by @Kantis in #3358
- Plus or minus for zoned date time draft (#8) by @AlexCue987 in #3785
- Plus or minus for instant draft (#7) by @AlexCue987 in #3784
- Fix race condition in beforeSpec by @sksamuel in #3763
- Provide overriddable defaults for eventually by @sksamuel in #3788
- cutting docs for 5.8 (right this time) by @Kantis in #3791
- Fix compiler plugin for K2 compiler by @OliverO2 in #3800
- Local time plus or minus take2 by @AlexCue987 in #3802
- docs: fix EnabledCondition example (interface, not class) by @jhult in #3810
- Update inspectors.md - Fixed a typo by @karuturi in #3811
- Fix
BigDecimal.ZERO.shouldBePositive()
returning true by @pubiqq in #3814 - Add
intersect
matcher to ranges by @AlexCue987 in #3792 - tiny doc fix by @fantayeneh in #3823
- fix: Path.shouldBeAFile should fail on non-existant files by @LeoColman in #3826
- Add
shouldNotBePositive
andshouldNotBeNegative
matchers for BigDecimal by @pubiqq in #3818 - Support
Iterable
inwithData
on root level by @obecker in #3831 - Added java.time.Year arbitrary support by @kshired in #3842
- Added java.time.Year supports for reflective arbitrary bind by @kshired in #3844
- Have upper bound print violations by @AlexCue987 in #3847
- ContainDuplicates should print them (#20) by @AlexCue987 in #3846
- Should contain exactly in any order count mismatch draft (#19) by @AlexCue987 in #3845
- Replace Range Intersect tests with Property Tests by @AlexCue987 in #3824
- Changing the Kotlin Gradle plugin dependncy to compileOnly by @Kantis in #3856
- Publishing JVM jar and pom in root variant by @Kantis in #3859
- Fixing Arb.localDate when minDate == maxDate by @Kantis in #3860
- fix(deps): update dependency io.mockk:mockk to v1.13.9 by @renovate in #3853
- Add selfie snapshot testing to the extensions listing by @nedtwigg in #3870
- Contains in order more details (#29) by @AlexCue987 in #3871
- Fix maxDate not being generated by Arb.localDate() by @oliverblaha in #3876
- print-duplicates (#33) by @AlexCue987 in #3883
- document-plusOrMinus-for-temporals (#34) by @AlexCue987 in #3885
- Add selfie snapshot testing to the versioned docs pages by @nedtwigg in #3887
- override suspend fun beforeTest (#36) by @AlexCue987 in #3892
- Creating a PR base workflow that shall be mandatory by @Kantis in #3893
- Fix the snapshot version badge in index markdowns by @graceful-martin in #3888
- add support for SortedSet and add test accordingly by @mirageoasis in #3873
- Have upper bound failure with more detail (#32) by @AlexCue987 in #3882
- ShouldExistInOrderTest.kt (#30) by @AlexCue987 in #3872
- Remove unnecessary delay when retry and fix error message by @kshired in #3891
- more detailed failure for startWith and endWith by @AlexCue987 in #3886
- Refactoring CI workflow by @Kantis in #3897
- Quote expected and actual exception messages in assertions by @sschuberth in #3894
- Preserving original failure when short-circuiting eventually by @Kantis in #3864
- Update dependency io.github.classgraph:classgraph to v4.8.165 by @renovate in #3816
- comparing Maps, find keys similar to missing (#27) by @AlexCue987 in #3866
- Contains in order more details draft (#43) by @AlexCue987 in #3907
- Added IPAddressV6 arb by @kshired in #3905
- Add includeFirst option to EventuallyConfiguration by @kin4496 in #3904
- Update dependency io.mockk:mockk to v1.13.10 by @renovate in #3902
- Update dependency com.jayway.jsonpath:json-path to v2.9.0 by @renovate in #3903
- implement beWithin for ClosedRange and OpenEndRange by @AlexCue987 in #3839
- Make
shouldBe expected
equivalent toshould be(expected)
for non-matcher objects by @pubiqq in #3827 - Framework should handle stack traces not being available by @sksamuel in #3916
- add search for similar items to containAll by @AlexCue987 in #3909
- Do not allow TestConfiguration::tags after spec is initialized by @sksamuel in #3919
- Rename unresolved test config and allow passing into test methods by @sksamuel in #3917
- Arb.distinct() should work for edgecases by @sksamuel in #3920
- specify module name kotest-assertions-json by @jlous in #3898
- Using NoSystemOutListener prevents single tests from being executed by @sksamuel in #3923
- Fix information printed by KProperty0.shouldHaveValue (#3908) by @gianninia in #3921
- withEdgecases should keep shrinker #3812 by @sksamuel in #3922
- Fix TestWithConfigBuilder#config using parsed name when clear TestDslState by @kshired in #3798
- Proper fix for DescribeSpec test with a multiline description by @sksamuel in #3926
- Allow equals comparison of BigDecimals with different scales by @sksamuel in #3924
- Fixed use of type alias in shouldBeEqualToComparingFields by @sksamuel in #3927
- Don't consider kotlinx and javax types to be builtin by @Kantis in #3899
New Contributors
- @tamj0rd2 made their first contribution in #3756
- @mirageoasis made their first contribution in #3757
- @jcthenerd made their first contribution in #3737
- @seongahjo made their first contribution in #3782
- @jhult made their first contribution in #3810
- @karuturi made their first contribution in ht...
v5.8.0
What's Changed
- Remove hardcoded emil path by @sksamuel in #3700
- Fix until timeout by @sksamuel in #3699
- Improve documentation on beforeEach, beforeAny and beforeTest by @pientaa in #3698
- Update docusaurus monorepo to v2.4.3 by @renovate in #3713
- Update dependency io.kotest.extensions:kotest-extensions-mockserver to v1.3.0 by @renovate in #3715
- Add range to reflective Set of Enum values by @tbvh in #3710
- Fix ordering of beforespec and user interceptors by @sksamuel in #3716
- Add backgroundScope in KMP #3708 by @sksamuel in #3717
- Support objects when using FQN for config by @sksamuel in #3718
- Add see-difference formatting to shouldHaveValue by @matejdro in #3707
- assertions.nondeterministic: Update package name in docs and tests by @OliverO2 in #3727
- Added shouldBeSortedDescending matcher by @kshired in #3721
- Add warning about kotest.assertions.collection.enumerate.size property by @matejdro in #3724
- Fixed containAll Matchers with varargs by @kshired in #3731
- Fixed shouldContainAnyOf matchers with varargs by @kshired in #3733
- docs(tags.md) - update code snippet to pass env vars to jvm by @k-times-c in #3729
- support-ranges by @AlexCue987 in #3735
- Fix TestFactory does not close AutoCloseable objects by @kshired in #3739
- Added support for sequence arbitraries by @kshired in #3719
- Improve Sequence.shouldContainExactly(...) by @obecker in #3743
- Improve Sequence.shouldHaveSingleElement(...) by @obecker in #3745
- Added support for array arbitraries by @kshired in #3728
- Fix using IrFactory's deprecated api by @kshired in #3750
New Contributors
- @k-times-c made their first contribution in #3729
- @AlexCue987 made their first contribution in #3735
- @obecker made their first contribution in #3743
Full Changelog: v5.7.2...v5.8.0
v5.7.2
v5.7.1
Fix timeout detection when withTimeout wraps a blocking job (#3675) * Fix timeout detection when withTimeout wraps a blocking job This is a workaround for kotlinx.coroutines/issues/3875. Fixes #3672 * Add timeout tests --------- Co-authored-by: Sam <sam@sksamuel.com>
v5.7.0
v5.6.2
5.6.2 May 2023
Assertions
Property testing
- Fixes a problem with property testing on Apple platforms #3506
- Reverts behaviour of
Arb.string()
to only generate Strings of printable ascii characters- 5.6.0 changed it to include some control characters, see #3513 for details
- Fix huge allocation for OffsetDateTime Arb without arguments by @rescribet in #3491
- Fix Arb.map edgecases by @myuwono in #3496
Documentation
- Update writing_tests.md by @erikhuizinga in #3497
- Update shouldBeEqualToComparingFields doc by @ktrueda in #3416
Other
- Build Kotlin/Native library for ARM64 on Linux by @charleskorn in #3521
⚠️ Reverted behavior of Arb.string()
With Kotest 5.6.0, Codepoint.ascii()
was changed to include a wider range of ascii chararacters, and Codepoint.printableAscii()
was introduced with the historic range used by Codepoint.ascii()
.
Arb.string()
has been using Codepoint.ascii()
as it's default for generating chars for the string. This caused issues for some users, and we decided to revert Arb.string()
to the historic behavior by changing the default to the new Codepoint.printableAscii()
.
Hopefully this doesn't cause any issues for you. If it does, you can revert to the 5.6.0 ~ 5.6.1 behavior by using Codepoint.ascii()
explicitly.
If you added explicit usage of Codepoint.printableAscii()
to circumvent the issue, you can safely remove the explicit parameter starting with Kotest 5.6.2.
New Contributors
- @rescribet made their first contribution in #3491
- @ktrueda made their first contribution in #3416
- @erikhuizinga made their first contribution in #3497
Full Changelog: v5.6.1...v5.6.2
v5.6.1
Maintenance release, published since 5.6.0 failed to upload for some targets.
Breaking changes (from 5.5.5 -> 5.6.x)
- Moved
ConstantNow
-related functions to a new module namedio.kotest:kotest-extensions-now
(remember to add -jvm suffix for Maven)- Add this module as a dependency to keep using
withConstantNow
- Add this module as a dependency to keep using
- Remove Iterable checking logic from IterableEq (#3420)
See full changelog at https://kotest.io/docs/changelog.html