Albilaga
09/04/2025, 9:49 AM./gradlew kotestDebugUnitTest
or
./gradlew test
?MarkRS
09/05/2025, 12:03 PMPlugin 'kotest' (version '6.0.101-2025.2') is not compatible with the current version of the IDE, because it requires build 252.23892 or newer but the current build is AI-251.26094.121
However, I'm on Narwhal Feature Drop 3.
Is this a case of AS lagging behind IntelliJ?Piotr Krzemiński
09/06/2025, 4:56 AMTest running process exited unexpectedly., exited with errors (exit code: 1). Build scan: https://scans.gradle.com/s/njfqnaca7haps. How do I debug this? Looks like a regression in kotest.Emre
09/09/2025, 5:59 PMgradle kotest exit code 0 on failed tests but gradle test correctly returns 1? Is there a setting for this? Tested on kotest 6.0.2, gradle 9.0.0.Emre
09/10/2025, 1:49 AMEdoardo Luppi
09/10/2025, 2:24 PM--tests work?Jonathan Lennox
09/10/2025, 6:40 PMNoClassDefFound kotlin/coroutines/jvm/internal/SpillingKt
Does kotest 5.9.1 work with Kotlin 2.2.0, or do I need to update to 6.0.3?Edgar
09/11/2025, 9:26 AMTesting started at 11:21 ...
java.lang.NoClassDefFoundError: kotlin/reflect/full/KClasses
at io.kotest.common.reflection.JvmReflection.supers(reflection.kt:43)
at io.kotest.common.reflection.JvmReflection.annotations(reflection.kt:34)
at io.kotest.common.reflection.JvmReflection.annotations(reflection.kt:25)
at io.kotest.engine.concurrency.ConcurrencyKt.isIsolate(concurrency.kt:30)
at io.kotest.engine.TestSuiteScheduler.schedule(TestSuiteScheduler.kt:39)
at io.kotest.engine.TestEngine$execute$innerExecute$1.invoke(TestEngine.kt:66)
at ...
Caused by: java.lang.ClassNotFoundException: kotlin.reflect.full.KClasses
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 49 more
kotlin/reflect/full/KClasses
However, running all the tests in the class, works perfectly.
Is there a way to solve this? 🙏Olaf Gottschalk
09/16/2025, 6:48 AMshouldHaveSingleElement(element)
shouldHaveSingleElement { block... }
Every time I want to use them, I have to go back to documentation and/or code to see for myself that the first one, which takes an element actually does assert that the collection contains just a single element and the latter, which takes a predicate, does not do that, instead it only checks the collection to contain one single element that passes the predicate, but could potentially contain many more elements.
The documentation piece I found here looks like this:
collection.shouldHaveSingleElement(element) Asserts that the collection only contains a single element and that that element is the given one.
collection.shouldHaveSingleElement { block } Asserts that the collection contains a single element by a given predicate.
This is very error prone as most of the time my assumption is I need a check that the collection contains a single element and the next step is only to either be able to provide the element for equals test OR a predicate to check some aspects of the element - but never I expect different behaviour in the main aspect of the function.
Can somebody explain to my why we have this and whether it really is intentionally? Maybe I don't see it...
Thanks!Shervin
09/16/2025, 8:45 AMkotest-framework-api-jvm is not generated for last few releases,
https://repo.maven.apache.org/maven2/io/kotest/kotest-framework-api-jvm/
latest generated is 6.0.0.M1 where we have higher versions in `assertions-core`like 6.0.3
is this expected ?Shervin
09/17/2025, 3:03 PMBehaviorSpec), not running, when kotest-extensions-roboelectric dependency is added to the module ?
Im using 6.0.3 and 0.5.0 versions respectively.
I get the following error:
'io.kotest.engine.tags.TagExpression io.kotest.core.extensions.TagExtension.tags()'
java.lang.NoSuchMethodError: 'io.kotest.engine.tags.TagExpression io.kotest.core.extensions.TagExtension.tags()'
at io.kotest.engine.tags.TagExpressionBuilder.build(runtime.kt:15)
at io.kotest.engine.spec.interceptor.ref.enabled.TagsInterceptor.intercept-0E7RQCE(TagsInterceptor.kt:28)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.ref.DescriptorFilterSpecRefInterceptor.intercept-0E7RQCE(DescriptorFilterSpecRefInterceptor.kt:41)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.ref.ApplyExtensionsInterceptor.intercept-0E7RQCE(ApplyExtensionsInterceptor.kt:36)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.ref.enabled.IgnoredSpecInterceptor.intercept-0E7RQCE(IgnoredSpecInterceptor.kt:47)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.ref.enabled.DisabledIfInterceptor.intercept-0E7RQCE(DisabledIfInterceptor.kt:46)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.ref.enabled.EnabledIfInterceptor.intercept-0E7RQCE(EnabledIfInterceptor.kt:41)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.ref.enabled.RequiresPlatformInterceptor.intercept-0E7RQCE(RequiresPlatformInterceptor.kt:25)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.ClassVisibilitySpecRefInterceptor.intercept-0E7RQCE(ClassVisibilitySpecRefInterceptor.kt:29)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline$execute$3$1.invoke-gIAlu-s(SpecRefInterceptorPipeline.kt:49)
at io.kotest.engine.spec.interceptor.SpecRefInterceptorPipeline.execute-0E7RQCE(SpecRefInterceptorPipeline.kt:52)
at io.kotest.engine.spec.execution.SpecRefExecutor.execute(SpecRefExecutor.kt:45)
at io.kotest.engine.TestSuiteScheduler.executeIfNotFailedFast(TestSuiteScheduler.kt:97)
at io.kotest.engine.TestSuiteScheduler.access$executeIfNotFailedFast(TestSuiteScheduler.kt:29)
at io.kotest.engine.TestSuiteScheduler$schedule$11$1$2.invokeSuspend(TestSuiteScheduler.kt:77)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:94)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:70)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at io.kotest.engine.RunBlocking_jvmKt.runBlocking(runBlocking.jvm.kt:3)
at io.kotest.engine.TestEngineLauncher.launch(TestEngineLauncher.kt:206)
at io.kotest.runner.junit.platform.KotestJunitPlatformTestEngine.execute(KotestJunitPlatformTestEngine.kt:74)
at io.kotest.runner.junit.platform.KotestJunitPlatformTestEngine.execute(KotestJunitPlatformTestEngine.kt:47)Emre
09/18/2025, 4:24 PMgradle kotest and it triggered buildOpenApi. Does anyone know why?
[kotest] $ gradle kotest
> Task :buildOpenApi
Ktor's OpenAPI generation is ** experimental **
- It may be incompatible with Kotlin versions outside 2.2.20
- Behavior will likely change in future releases
- Please report any issues at <https://youtrack.jetbrains.com/newIssue?project=KTOR>
<==========---> 76% EXECUTING [7s]
gradle test does not do this.Piotr Krzemiński
09/19/2025, 8:51 AM110. IGNORED
- emit unicode OK
- escape unicode OK
I see two problems here:
1. Instead of a name of the test file/module, there are two whitespaces (as if the name was omitted) and just IGNORED .
2. Each test case gets a green OK, but the whole test file/module is IGNORED. It's inconsistent because it both looks as if the whole test file/module was ignored, yet individual test cases are executedEmiel Bon
09/19/2025, 10:34 AMJunitXmlReporter implementation for non-JVM targets for 6.0.0. I guess it didn't make it in, is it still on the radar?solonovamax
09/22/2025, 8:20 AMbuild/test-results/jvmTest for the jvmTest task, build/test-results/linuxX64Test for the linuxX64Test task, etc.
from what I can tell there doesn't really seem to be any good solution for this...Sebastian Schuberth
09/23/2025, 8:48 AMArb.bind<File>().single() to create a single arbitrary file? Specifically, I'm looking for something like inline fun <reified T> arb(): T = Arb.bind<T>().single(), but that does not compile.solonovamax
09/25/2025, 7:17 PMStableIdents.getStableIdentifier(Any?) be re-exposed so that it can be used?
I was using it for the kotlin/js platform because I could not use withData(), as it would result in an error saying "Nested tests are not supported". my workaround for this was to instead use withClue() on the kotlin/js platform, doing this:
actual fun FunSpecRootScope.testPrecomputed(
context: String,
precomputed: List<FuzzyTestData>,
resultFunction: (String, String) -> Double,
) {
context(context) {
precomputed.forEach {
withClue({ getStableIdentifier(it) }) {
resultFunction(it.first, it.second) shouldBe (it.result plusOrMinus DEFAULT_TOLERANCE)
}
}
}
}
in kotest 6.0.0, this would instead be changed to use StableIdents.getStableIdentifier(it), however this does not work because StableIdents is internal.
I was told previously that nested tests would be present in 6.0, however they don't seem to be.Alfonso Ristorato
09/28/2025, 10:12 AMwithData generic, I went ahead and raised a PR on how I would attempt this. It's by no means supposed to be accepted, especially if the team was already working on this, but in case it helps with inspiration, or is considered good enough to merge, here it is 😄 https://github.com/kotest/kotest/pull/5113Gautam Shorewala
09/30/2025, 1:03 PMclass TestDispatcherTest : FunSpec() {
init {
coroutineTestScope = true
test("this test uses a test dispatcher") {
}
test("and so does this test!") {
}
}
}
now when i tried this in my code there the test crashes with
Dispatchers.Main was accessed when the platform dispatcher was absent and the test dispatcher was unset. Please make sure that Dispatchers.setMain() is called before accessing Dispatchers.Main and that Dispatchers.Main is not accessed after Dispatchers.resetMain().
This is a snippet of my test
class EnterOtpComponentTest : FunSpec() {
private lateinit var component: EnterOtpComponent
private val mockOtpRepository = mockk<OtpRepository>(relaxed = true)
private val testNumber = "1234567890"
override val extensions: List<Extension> = listOf(
KoinExtension(
module = module {
single<OtpRepository> { mockOtpRepository }
},
)
)
init {
coroutineTestScope = true
mockkObject(Analytics)
beforeTest {
clearAllMocks()
}
testSendOtp()
testOnOtpEnter()
}
is there anything i might have missed or doing wrong?Alfonso Ristorato
10/07/2025, 8:57 PMstelios
10/08/2025, 3:31 PMBehaviorSpec. You select a Then, you type the shortcut and then all other Then’s are transformed to xThen.
My question is can we publish it in the marketplace? In that case, our we allowed to use the term Kotest something like Focus test for Kotest or is it trademarked?Giorgio Vespucci
10/10/2025, 1:56 PMGeardaddie
10/13/2025, 6:33 PMgradle kotest successfully I can’t run gradle build without it failing because it can’t find any tests. I’m sure I’ve got something configured wrong in Gradle, but I haven’t been able to find an example build script.
kotest.io
Setup | Kotest
The Kotest test framework is supported on JVM, Javascript and Native.sam
10/15/2025, 5:19 AMsam
10/15/2025, 5:19 AMEmre
10/19/2025, 10:49 PMThe plugin doesn't register an error report submitter extension, so neither the "Report Exception" button nor the description area are enabled.https://youtrack.jetbrains.com/issue/IJPL-213335 Have you received any reports directly from the IDE lately? This is with 6.0.101-2025.2
Dave
10/22/2025, 12:06 PMBartek Milken
10/22/2025, 1:06 PMIsolationMode.InstancePerLeaf?Olaf Gottschalk
10/23/2025, 8:18 AMRob Elliot
10/24/2025, 10:18 AMsatisfy matcher should already be in the assertions library, or else there's a better pattern to be used...