Skip to main content
Version: 5.7

Setup

The Kotest test framework is supported on JVM, Javascript and Native. To enable Kotest for multiple platforms, combine the steps for the individual platforms as detailed in the following tabs.

Kotest on the JVM uses the JUnit Platform gradle plugin. For Gradle 4.6 and higher this is as simple as adding useJUnitPlatform() inside the tasks with type Test and then adding the Kotest junit5 runner dependency.

If you are using Gradle + Groovy then:

test {
useJUnitPlatform()
}

Or if you are using Gradle + Kotlin then:

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

And then the dependency:

testImplementation 'io.kotest:kotest-runner-junit5:$version'