Overview of Kotest Testing Styles
Kotest provides 8 different testing styles (Specs) to structure test definitions. There are no functional differences between them; all support the same configurations (threads, tags, etc.). To use a style, create a class that extends the desired Spec and define test cases within the init { } block (or the constructor lambda).
| Test Style | Inspired By |
|---|---|
| Behavior Spec | Gherkin / BDD frameworks |
| Describe Spec | Javascript frameworks / RSpec |
| Expect Spec | Kotest original |
| Feature Spec | Cucumber |
| Fun Spec | ScalaTest |
| Free Spec | ScalaTest |
| Should Spec | Kotest original |
| String Spec | Kotest original |
| Word Spec | ScalaTest |