Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Kotlin Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-kotlin-testing)
---
name: kotlin-testing
description: "Write and fix tests in Kotlin: use Kotest or JUnit 5 with kotlin-test, mocking at boundaries, async tests and CI settings."
tags: [kotlin, testing]
---
# Kotlin Testing
## When to use
- Writing or reviewing Kotlin tests
- Setting up a test suite
- Fixing slow or flaky tests
## Procedure
1. Use Kotest or JUnit 5 with kotlin-test
2. Test coroutines with runTest and TestDispatcher
3. MockK for boundaries
4. Turbine for Flow assertions
## Checklist
- [ ] No real delays in coroutine tests
- [ ] Flows fully collected or cancelled
## Anti-patterns
- Thread.sleep in tests
- GlobalScope in production code under test