Benoît Liessens
07/29/2025, 6:07 AMio.kotest.extensions:kotest-extensions-clock:1.0.0
is obsolete as type TestClock
is now part of io.kotest:kotest-extensions:6.0.0.M6
?
The old clock extensions is still referenced in the 6.0.0 docsOğuzhan Soykan
07/29/2025, 10:09 AMimport io.kotest.data.*
is missing. Is there a new package for data-driven testing?Piotr Krzemiński
07/31/2025, 10:04 AMSebastian Schuberth
07/31/2025, 4:10 PMCaused by: java.lang.IllegalStateException: Could not locate a primary constructor for java.io.File
at io.kotest.property.arbitrary.JvmbindKt.forClassUsingConstructor(jvmbind.kt:104)
at io.kotest.property.arbitrary.TargetDefaultForClassNameKt.targetDefaultForType(targetDefaultForClassName.kt:100)
at io.kotest.property.arbitrary.JvmbindKt.forType(jvmbind.kt:150)
at io.kotest.property.arbitrary.JvmbindKt.arbForParameter(jvmbind.kt:136)
with Kotest 5.9.1? Looks like there is an Arb implementation for File
...Piotr Krzemiński
08/01/2025, 6:04 AMPiotr Krzemiński
08/04/2025, 9:13 AM- Task `:linuxX64Kotest` of type `io.kotest.framework.gradle.tasks.KotestNativeTask`: cannot serialize object of type 'org.gradle.api.DefaultTask', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
See <https://docs.gradle.org/8.14.3/userguide/configuration_cache.html#config_cache:requirements:task_access>
- Task `:linuxX64Kotest` of type `io.kotest.framework.gradle.tasks.KotestNativeTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
See <https://docs.gradle.org/8.14.3/userguide/configuration_cache.html#config_cache:requirements:disallowed_types>
- Task `:linuxX64Kotest` of type `io.kotest.framework.gradle.tasks.KotestNativeTask`: cannot serialize object of type 'org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeHostTest', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
When I turn off Configuration Cache, this problem is gone.Ulrik Rasmussen
08/05/2025, 9:23 AMM1
, M2
, ..., suffixes mean? Does it indicate that it is a release candidate and not an official release, or did the scheme just change?Petr Iakovenko
08/09/2025, 9:37 AMkotest-runner-junit5
to kotest-framework-engine
, but I’m running into a couple of issues that didn’t happen with the JUnit runner
• debugging tests in IntelliJ doesn’t work — it just runs the test instead of debugging
• logs only appear after the job has finished or been stopped (in the logs I see that it’s using listener=teamcity
)
I’m running the tests using the Kotest plugin
6.0.0.M13mudasar187
08/11/2025, 1:08 PM6.0.0.M15
, but this import/dependencies does not exists anymore?
import io.kotest.data.forAll
import io.kotest.data.row
Tried to find any documentation for this, but cannot find anything?LeoColman
08/17/2025, 11:09 AMclass BambuMqttTransportSpec : FunSpec({
val serial = "SER123"
val access = "IGNORED"
val mosquitto = install(ContainerExtension(GenericContainer("eclipse-mosquitto:2.0"))) {
withExposedPorts(1883)
}
test("Basic connection to mosquitto container") {
val mqttClient = MqttClient("tcp://${mosquitto.host}:${mosquitto.getMappedPort(1883)}", UUID.randomUUID().toString())
mqttClient.connect()
mqttClient.disconnect()
}
})
In the test, connect fails because "Requested port (1883) is not mapped"Piotr Krzemiński
08/19/2025, 12:23 PMsam
08/19/2025, 10:01 PMsam
08/19/2025, 10:02 PMMichael Strasser
08/20/2025, 4:25 AMsam
08/21/2025, 1:27 AMGopal S Akshintala
08/21/2025, 10:00 AMwithData
not supported under StringSpec? https://kotest.io/docs/framework/datatesting/data-driven-testing.html
Also are these fully removed in 6.0?
import io.kotest.data.forAll
import io.kotest.data.row
If yes, where can I find the migration guide for StringSpec
tests?nerses
08/21/2025, 9:04 PMAlexander Ioffe
08/22/2025, 12:54 AMplugins {
...
alias(libs.plugins.kotest)
id("com.google.devtools.ksp") version "2.2.0-2.0.2"
}
Instead of this:
plugins {
...
id("com.google.devtools.ksp") version "2.2.0-2.0.2"
alias(libs.plugins.kotest)
}
This happens:
An exception occurred applying plugin request [id: 'io.kotest', version: '6.0.0']
> Failed to apply plugin 'io.kotest'.
> KSP neither found in root project nor exoquery-runner-core, please add 'com.google.devtools.ksp' to the project's plugins
Alexander Ioffe
08/22/2025, 3:39 PMabstract class MySpec(
val variousStuff: VariousStuff,
body: MySpec.() -> Unit
): FreeSpec(body as Function1<FreeSpec, Unit>) { ... }
It works just fine for JVM but when I try doing a native (e.g. LinuxX64) it produces an invalid entry in kotest.kt
that looks like this:
SpecRef.Function ({ `Test1`() }, `Test1`::class, "my.stuff.Test1"),
SpecRef.Function ({ `Test2`() }, `Test2`::class, "my.stuff.Test2"),
SpecRef.Function ({ `MySpec`() }, `MySpec`::class, "my.stuff.MySpec"),
SpecRef.Function ({ `Test3`() }, `Test3`::class, "my.stuff.Test3"),
SpecRef.Function ({ `Test4`() }, `Test4`::class, "my.stuff.Test4"),
I worked around it by making MySpec
a regular (albeit open) class and adding a no-args constructor but it seems like a hack. Maybe the Kotest KSP could be modified to check if the class is abstract and then not add it to this list? I think you could do something like:
(type:KSType).declaration.modifiers.contains(Modifier.ABSTRACT)
nerses
08/22/2025, 4:44 PMclass MyConfig : AbstractProjectConfig() {
override fun extensions(): List<Extension> = listOf(
JunitXmlReporter(
includeContainers = false, // don't write out status for all tests
useTestPathAsName = true, // use the full test path (ie, includes parent test names)
outputDir = "../target/junit-xml" // include to set output dir for maven
)
)
}
needs to change
class MyConfig : AbstractProjectConfig() {
override val extensions = listOf(
JunitXmlReporter(
includeContainers = false, // don't write out status for all tests
useTestPathAsName = true, // use the full test path (ie, includes parent test names)
outputDir = "../target/junit-xml" // include to set output dir for maven
)
)
}
nerses
08/22/2025, 4:46 PMkotest.framework.config.fqn=com.expedia.www.cloudgate.KotestConfig
Bart
08/22/2025, 8:40 PMOlaf Gottschalk
08/25/2025, 11:20 AMrow
function is missing (as I had to remove dataset dependency). And, another really bad design decision: withData
is now implemented several times on the different specs - not as an extension on ContainerScope
, but as different functions on FunSpecContainerScope
, StringSpecContainerScope
, etc... This hurts a lot as I had my own extensions that used withData
internally and now I have to go for the specific spec type, even though it used to be completely independent of the spec type used... anybody else bothered by that?Olaf Gottschalk
08/25/2025, 11:25 AMkotest-runner-junit5
contained a dependency to kotlinx-coroutines
, which was great as sometimes I needed Coroutines in my tests, e.g. with Arrow's Raise DSL, you need Coroutines. Now this transient dependency disappeared... the runTest
function is not available anymore. This is really bad, as now my project which does not really do much else with Coroutines needs to depend on kotlinx-coroutines
itself... I need to track down the latest version, etc. Can this be re-added? Any reason for removal?Sebastian Schuberth
08/25/2025, 7:37 PMwithEnvironment
in some Hoplite-related tests. Now that Kotest 6 removed withEnvironment
, I wonder how I should implement those tests instead... esp. as Hoplite itself is also making use with `withEnvironment`.Yuri
08/26/2025, 3:06 PM@OptIn(ExperimentalKotlinGradlePluginApi::class)
powerAssert {
functions = listOf("io.kotest.matchers.shouldBe")
}
During compilation I see "Internal compiler error" and with some following details:
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: ***user route***
The root cause java.lang.AssertionError was thrown at: org.jetbrains.kotlin.backend.jvm.lower.AddContinuationLoweringKt.retargetToSuspendView(AddContinuationLowering.kt:487)
at org.jetbrains.kotlin.backend.common.BackendException$Companion.report(BackendException.kt:31)
at org.jetbrains.kotlin.backend.common.BackendException$Companion.report$default(BackendException.kt:15)
at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(PerformByIrFilePhase.kt:37)
at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(PerformByIrFilePhase.kt:15)
at org.jetbrains.kotlin.backend.common.phaser.PhaseEngine.runPhase(PhaseEngine.kt:64)
at org.jetbrains.kotlin.backend.common.phaser.PhaseEngine.runPhase$default(PhaseEngine.kt:56)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.invokeLowerings(JvmIrCodegenFactory.kt:359)
...
Caused by: java.lang.AssertionError: FUN LOCAL_FUNCTION_FOR_LAMBDA name:invokeSuspend$lambda$0 visibility:private modality:FINAL <> ... [suspend]
at org.jetbrains.kotlin.backend.jvm.lower.AddContinuationLoweringKt.retargetToSuspendView(AddContinuationLowering.kt:487)
...
Maybe somebody faced the similar problem? Is this problem kotest-related?thanksforallthefish
08/27/2025, 8:51 AMnull shouldBe true
would anyway fail, so it should be possible to return non nullable.
the "issue" with returning nullable is that something like true.shouldBeTrue().toArray()
does not compile anymore, it has to be true.shouldBeTrue()?.toArray()
with all the chaining issue (I should mention toArray
is a custom extension function expecting a non-nullable receiver)Piotr Krzemiński
08/27/2025, 12:05 PMobj shouldNotBe null
is not equivalent to obj.shouldNotBeNull()
. The former was used by Junie when obj
was an iterator, and instead of just asserting on it not being null
, it consumed all items of the iterator, making it unusable for future assertions. I think both should be equivalent since they read the same, and here in should.kt, we could have another check: if any
is null
. If yes, delegate it to any.shouldNotBeNull()
. The same applies to shouldBe null
. WDYT?koufa
08/28/2025, 8:24 AMException in thread "main" java.lang.IllegalStateException: The specs arg must be provided
at io.kotest.engine.launcher.MainKt.main(main.kt:73)
Is there anything I need to adapt so that this is supported?Gopal S Akshintala
08/28/2025, 3:24 PM