Skip to main content
Version: 6.2 🚧

Quick Start

Kotest is a flexible and comprehensive testing project for Kotlin with multiplatform support.

For latest updates see Changelog.

Kotest is divided into three, stand-alone projects, each of which can be used independently:

You can decide to go all in on Kotest and use all three together, or you can choose to one or more modules in conjunction with other projects. For example, you could use the assertion library with JUnit, or you could use the test framework with another assertion library like AssertJ.

This page gives setup instructions for various combinations of projects and targets.

[Multiplatform Support]

Kotest is a multiplatform project and supports all targets - JVM, JS, Native, iOS and so on.

Test Framework​

The Kotest test framework is supported on all targets. On the JVM it builds on top of the JUnit Platform project, and on Kotlin Multiplatform, it leverages the existing Gradle Test infrastructure. To set up kotest as your testing framework, follow detailed instructions in the framework documentation page.

Assertions Library​

The core assertions library framework is supported on all targets. Extensions are supported on the platforms that are applicable to that extension. For example, the JDBC matchers are only provided for the JVM since JDBC is a Java library.

Add the following dependency to your dependencies block:

testImplementation("io.kotest:kotest-assertions-core:$version")

View the assertions library documentation for more information.

Property Testing​

The property test framework is supported on all targets.

Add the following dependency to your build:

testImplementation("io.kotest:kotest-property:$version")

View the property testing documentation for more information.

Snapshots​

Snapshots are automatically published on each commit to master. If you want to use the latest snapshot build, set up the dependencies in the same way described above, changing the version to the current snapshot version and add the following repository to your repositories block:

repositories {
maven("https://central.sonatype.com/repository/maven-snapshots/")
}

The latest snapshot version can be found on the GitHub README page in the badges section.