writing-tests-with-kotlin-test
CommunityWrite one assertion API across every target.
Software Engineering#assertions#kotlin-test#multiplatform-testing#typed-exceptions#junit-adapter#commonTest#Asserter
Authorskydoves
Version1.0.0
Installs0
System Documentation
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 likeassertContentEquals,assertContains, plusfail,expect, and exception assertions (assertFails,assertFailsWith). - Safety and quality guardrails: Leverages
@OnlyInputTypesto make type mismatches fail at compile time, not at runtime, and supports theAsserterextension 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.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: writing-tests-with-kotlin-test Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#writing-tests-with-kotlin-test Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.