Skip to main content
Version: 6.1 🚧

Quick Start

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

For latest updates see Changelog.

Kotest is divided into several, stand alone, subprojects, 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 assertions library with JUnit, or you could use the test framework with another assertions library like assertj.

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

note

Kotest is a multiplatform project. If you are unfamiliar with this, then Kotlin compiles to different targets - JVM, JS, Native, iOS and so on. If you are doing server side or android development then you want the modules that end with JVM, such as kotest-property-jvm.

Test Framework​

The Kotest test framework is supported on JVM, Android, Javascript and Native. To setup 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. Submodules are supported on the platforms that applicable. For example, the JDBC matchers only work for JVM since JDBC is a Java library.

Add the following dependency to your build:

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​

Snapshot are automatically published on each commit to master. If you want to test the latest snapshot build, setup the same way described above, change the version to the current snapshot version and add the following repository to your repositories block:

https://s01.oss.sonatype.org/content/repositories/snapshots