What problem does it solve?
It solves the problem of writing portable Kotlin tests by giving you a single, multiplatform-compatible set of annotations and assertion functions that work the same across JVM, Android, JS, Native, and Wasm without tying your code to JUnit APIs.
Core Features & Use Cases
- Framework-agnostic test annotations: Use
@Test, @Ignore, @BeforeTest, and @AfterTest, which typealias to the active test framework on each platform (e.g., JUnit4 vs JUnit5).
- Portable assertions: Use
assertEquals/assertNotEquals, identity checks (assertSame), null checks (assertNull/assertNotNull), type checks (assertIs/assertIsNot), and collection/value helpers like assertContentEquals, assertContains, plus fail, expect, and exception assertions (assertFails, assertFailsWith).
- Safety and quality guardrails: Leverages
@OnlyInputTypes to make type mismatches fail at compile time, not at runtime, and supports the Asserter extension point to control failure rendering.
Quick Start
Use this skill when you need to write multiplatform tests by importing kotlin.test symbols (such as kotlin.test.*, @BeforeTest, and assertFailsWith) and keeping your test source engine-agnostic.