Skip to main content
Version: 5.7

matchers

For the extension function style, each function has an equivalent negated version, for example, a.shouldNotStartWith("boo").

Kotest Matcher Modules​

These modules provide the core matcher experience. They are hosted in the main Kotest repo, and are released on the same cadence as the Kotest framework.

ModuleDescriptionType
kotest-assertions-coreProvides matchers for standard libary types.Multiplatform
kotest-assertions-collectionsProvides matchers for Collection, Iterable, and Array types.Multiplatform
kotest-assertions-jsonProvides matchers for testing json objects.JVM
kotest-assertions-kotlinx-timeProvides matchers for Kotlin's date / time library.Multiplatform
kotest-assertions-sqlProvides matchers for JDBC.JVM
kotest-assertions-ktorProvides matchers for Ktor server test and client libraries.Multiplatform

Kotest External Matcher Modules​

These modules are hosted in the kotest organization but in separate repositories from the main kotest project. They are released on an independent cadence from the Kotest framework. They provide matchers for third party libraries.

ModuleDescriptionType
kotest-assertions-arrowProvides matchers for the Arrow functional programming library.JVM
kotest-assertions-compilerProvides matchers that test for compilable code.JVM
kotest-assertions-klockProviders matchers for Klock.Multiplatform
kotest-assertions-konformProvides matchers for Konform.Multiplatform
kotest-assertions-jsoupProvides matchers JSoup.JVM

Community Provided Matchers​

This is a list of projects that provide Kotest matchers. They are maintained outside of the Kotest organization.

LibraryDescription
AndroidToolbox for working with Kotest and Android
Http4kFunctional toolkit for Kotlin HTTP applications
MicronautJVM-based, full-stack framework for building modular, easily testable microservice