roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Prepare for Kotest interview questions on testing Kotlin code the framework's own way. Covers spec styles, matchers, data-driven and property-based tests, lifecycle and isolation, and coroutines.
179 of 179 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 179 new. 0 cut, outside your plan.
Kotest rarely gets a round of its own. It comes up inside the testing conversation of a Kotlin backend or Android loop, or in a pairing exercise where you extend a spec someone else wrote, and the interviewer watches whether you are writing Kotest or JUnit habits in Kotest syntax. The early questions are about how the DSL is built: what a bare string followed by a lambda compiles to in a StringSpec, why shouldBe reads like an operator, and why setup written straight into a describe or context body runs at a moment its author did not expect.
From middle level up the questions arrive as symptoms. A spec passes when one test runs alone and fails when the whole class runs, because its tests share one instance and a mutable list. A property test fails on one CI run in twenty and a teammate proposes raising maxFailure until the build is green. A serial suite of several thousand tests takes most of an hour. A weak answer names a setting. A strong one explains which isolation mode re-runs which block, how the printed seed replays a failure and what it cannot promise, and what concurrent specs do to a shared fixture before anything is switched on.
The plan opens below the framework. How a test is shaped and kept independent comes first, because isolation and flakiness keep returning through the rest of the plan. Two Kotlin language features follow: lambdas with a receiver and operator and infix functions. Every spec style and matcher is built from them, so the question of why a spec compiles at all is settled before it is asked.
The four middle stretches each pair an introductory topic with the framework's deeper branch on the same subject. Spec styles lead, since a style decides how a test is named and where its setup runs. Matchers come next, from plain equality to clues, soft assertions and matchers you compose yourself. Inputs follow in rising order of abstraction: rows you write by hand before inputs a generator produces, with the idea of a property placed ahead of the generator and shrinking mechanics so the API has a reason behind it.
Lifecycle and configuration turns from one test to the whole suite: when callbacks fire, how many spec instances a run creates, and which project-wide setting a spec can override. The plan ends where Kotest meets its surroundings. The JUnit Platform split explains how the Kotest engine runs beside Jupiter in one build, coroutine testing supplies the virtual-time scheduler that Kotest's own coroutine support installs, and the integrations close with polling assertions such as eventually and the extension modules.
Coming from JUnit, begin with the spec styles and then jump to the lifecycle stretch: the mistakes JUnit users usually make in Kotest are about when a block runs and how many instances a spec gets, not about syntax. If Kotest is one line in a Kotlin backend or Android job description, narrow level to the range you are applying at, raise importance to must know and leave study order on by frequency. For a senior or lead role, spend the hours on property testing, isolation and concurrency, where the questions ask for a policy covering a whole suite rather than a fix for one test. Mocking is outside this plan, including MockK, the library most Kotest suites use for test doubles, and so are Spring's test slices. The [Kotlin Backend Developer roadmap](/roadmaps/kotlin-developer) puts Kotest beside those tools and the Spring and persistence questions a Kotlin backend loop also asks, and the [Kotlin roadmap](/roadmaps/kotlin) covers the language underneath.
Coming from JUnit, begin with the spec styles and then jump to the lifecycle stretch: the mistakes JUnit users usually make in Kotest are about when a block runs and how many instances a spec gets, not about syntax. If Kotest is one line in a Kotlin backend or Android job description, narrow level to the range you are applying at, raise importance to must know and leave study order on by frequency. For a senior or lead role, spend the hours on property testing, isolation and concurrency, where the questions ask for a policy covering a whole suite rather than a fix for one test.
Mocking is outside this plan, including MockK, the library most Kotest suites use for test doubles, and so are Spring's test slices. The Kotlin Backend Developer roadmap puts Kotest beside those tools and the Spring and persistence questions a Kotlin backend loop also asks, and the Kotlin roadmap covers the language underneath.