Agent skill · Testing & QA

kotlin-testing

Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill kotlin-testing --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 20 KB
Bundled scripts: none
Path: skills/kotlin-testing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides the user through Kotlin testing patterns and workflows using Kotest, MockK, coroutine testing, property-based testing, and Kover coverage, aligned with TDD methodology.

How it works

  1. Identify target code — Find the function, class, or module to test
  2. Write a Kotest spec — Choose a spec style (StringSpec, FunSpec, BehaviorSpec) matching the test scope
  3. Mock dependencies — Use MockK to isolate the unit under test
  4. Run tests (RED) — Verify the test fails with the expected error
  5. Implement code (GREEN) — Write minimal code to pass the test
  6. Refactor — Improve the implementation while keeping tests green
  7. Check coverage — Run ./gradlew koverHtmlReport and verify 80%+ coverage

When to use it

  • Writing new Kotlin functions or classes
  • Adding test coverage to existing Kotlin code
  • Implementing property-based tests
  • Following TDD workflow in Kotlin projects
  • Configuring Kover for code coverage

What it can touch

  • Commands and tooling referenced: Kotest specs styles (StringSpec, FunSpec, BehaviorSpec, DescribeSpec)
  • MockK setup including coroutine mocking and argument capture
  • TDD workflow steps RED/GREEN/REFACTOR with sample EmailValidator
  • Kover coverage commands and checks

Caveats

  • License terms and repository context are not detailed here beyond the included examples and configurations
  • The material includes executable code samples and configuration commands that must be run in a Kotlin/Gradle project environment
From the SKILL.md

# Kotlin Testing Patterns Comprehensive Kotlin testing patterns for writing reliable, maintainable tests following TDD methodology with Kotest and MockK. ## When to Use - Writing new Kotlin functions or classes - Adding test coverage to existing Kotlin code - Implementing property-based tests - Following TDD workflow in Kotlin projects - Configuring Kover for code coverage ## How It Works 1. **Identify target code** — Find the function, class, or module to test 2. **Write a Kotest spec** — Choose a spec style (StringSpec, FunSpec, BehaviorSpec) matching the test scope 3. **Mock dependencies** — Use MockK to isolate the unit under test 4. **Run tests (RED)** — Verify the test fails with the expected error 5. **Implement code (GREEN)** — Write minimal code to pass the test 6. **Refactor** — Improve the implementation while keeping tests green 7. **Check coverage** — Run `./gradlew koverHtmlReport` and verify 80%+ coverage ## Examples The following sections contain detailed, runnable examples for each testing pattern: ### Quick Reference - **Kotest specs** — StringSpec, FunSpec, BehaviorSpec, DescribeSpec examples in [Kotest Spec Styles](#kotest-spec-styles) - **Mocking** — MockK setu

What's inside
Steps it walks through
  1. When to Use
  2. How It Works
  3. Examples
  4. Quick Reference
  5. TDD Workflow for Kotlin
  6. Kotest Spec Styles
  7. Kotest Matchers
  8. MockK
  9. Coroutine Testing
  10. Property-Based Testing
  11. Data-Driven Testing
  12. Test Lifecycle and Fixtures
  13. Kover Coverage
  14. Ktor testApplication Testing
Commands it runs
Run tests with coverage
Verify coverage thresholds
XML report for CI
View HTML report (use the command for your OS)
Run all tests
Run specific test class
Run specific test
Run with verbose output
Run with coverage
Run detekt (static analysis)
More from everything-openai-codex
All skills →
About this skill
What does the kotlin-testing skill do?

Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill kotlin-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going