Draft:Kotest
Software Test Framework
From Wikipedia, the free encyclopedia
Kotest is a test automation framework, assertions library and property testing library for the Kotlin programming language.[2] Kotest is used for unit testing, and is one of the xUnit frameworks. Kotest is one of the third party testing options recommended by Jetbrains in their Kotlin adoption guide[3].
| Review waiting, please be patient.
This may take 8 weeks or more, since drafts are reviewed in no specific order. There are 2,974 pending submissions waiting for review.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Reviewer tools
|
Submission declined on 31 July 2025 by Jlwoodwa (talk).
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
This draft has been resubmitted and is currently awaiting re-review. |
| This is a draft article. It is a work in progress open to editing by anyone. Please ensure core content policies are met before publishing it as a live Wikipedia article. Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL Last edited by Samspade79 (talk | contribs) 7 days ago. (Update)
This draft has been submitted and is currently awaiting review. |
| Kotest | |
|---|---|
| Developer | Kotest framework organization |
| Stable release | 6.1.5
/ March 8, 2026[1] |
| Written in | Kotlin |
| Type | Test framework |
| License | Apache 2.0 |
| Website | kotest |
| Repository | github |
Although Kotest is similar in function to many of the existing JVM based testing libraries, such as JUnit, it offers a Kotlin DSL that allows tests to be layered[4] and parameterized[5] in more powerful ways than standard class-method based testing libraries.
Kotest is available as a library from Maven central repository provided by Sonatype and is compatible with both Maven and Gradle build systems. The latest version of the framework, Kotest 6 resides under the Maven group name io.kotest.
In 2025, Apple began including Kotest[6] as a desired skill in their JVM based Wallet department job advertisements.
Kotest Styles
One of the defining features of Kotest is the ability to lay out tests in multiple ways to suit whatever preferences a development team may have. Kotest terms these styles as Specs. Examples include a Jasmine inspired layout named DescribeSpec, a BDD style layout named BehaviorSpec and a ScalaTest style layout called FunSpec.[7] There are eight spec styles in total.
Example of a Kotest spec
A Kotest test fixture, which is referred to as a Spec in Kotest, is a Kotlin class. Test cases are created as functions inside the class. If the situation requires it,[8] it is also possible to define lifecycle callbacks to execute functions before or after each (or all) of the test cases.
import io.kotest.core.spec.style.FunSpec
class MyTests : FunSpec({
test("String length should return the length of the string") {
"sammy".length shouldBe 5
"".length shouldBe 0
}
})
Assertions
The Kotest assertions library is one of the libraries that Jetbrains reference[9] as supporting Kotlin and Java. The following example shows some of the simplest Kotest's assertions:
2*2 shouldBe 4
3+1 shouldNotBe 5
"hello world" shouldStartWith "hello"
More advanced assertions explain the difference between expected and actual values in more detail. For instance, the following assertion does not find any exact match and fails, yet it finds a similar element:
listOf(sweetGreenApple, sweetGreenPear) shouldContain (sweetRedApple)
(snip)
PossibleMatches:
expected: Fruit(name=apple, color=red, taste=sweet),
but was: Fruit(name=apple, color=green, taste=sweet),
The following fields did not match:
"color" expected: <"red">, but was: <"green">
Assertions can be chained to allow fluent style, as follows:
val a: String? = "foo"
a.shouldNotBeNull()
.shouldHaveLength(3)
.shouldStartWith("fo")
.shouldEndWith("oo")
Multiplatform Support
Kotlin Multiplatform is supported[10] by Kotest. Supported targets include JVM, Javascript, WasmJS, WasmWasi, Macos, Linux, Windows, Android, Android-Native, iOS, tvOS and WatchOS.[11]
Integrations
Kotest integrates with many of the standard JVM testing libraries, as well as more specific Kotlin testing extensions. Such integrations include the cross platform Docker based TestContainers project, the Kotlin focused mocking library MockK, and Spring Test Profiles support.
Additionally, an Intellij IDEA plugin is provided to execute tests directly from any Intellij based IDE.[12]
Community
An official #kotest channel is available in the KotlinLang Slack workspace, which can be joined via the Kotlin community page.[13]
Technology Radar
Kotest has featured in multiple editions of the bi‑annual Thoughtworks Technology Radar. It first appeared in Volume 21 (November 2019) in the Assess ring, was promoted to the Trial ring in Volume 26 (March 2022), and reached the Adopt ring in Volume 27 (October 2022). The Radar highlights Kotest’s variety of testing styles, extensive matcher library, support for property‑based testing and its IntelliJ IDEA plug‑in as key reasons for adoption.[14]


- provide significant coverage: discuss the subject in detail, not just brief mentions or routine announcements;
- are reliable: from reputable outlets with editorial oversight;
- are independent: not connected to the subject, such as interviews, press releases, the subject's own website, or sponsored content.
Please add references that meet all three of these criteria. If none exist, the subject is not yet suitable for Wikipedia.