Kotlin Testing
Kotest, MockK, and Kover testing patterns that follow TDD, with runnable examples for each spec style.
- CCM score
- 69 of 100
- skills.sh installs
- 12.1K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the RED-GREEN-REFACTOR cycle with a worked EmailValidator example from failing test to passing code
- Includes Kotest spec styles (StringSpec, FunSpec, BehaviorSpec, DescribeSpec), MockK setup, and Kotest matchers
- Explains coroutine mocking, argument capture, and Ktor
testApplicationsetup for HTTP endpoint tests - Designed for Kotlin projects that need 80%+ coverage measured with
./gradlew koverHtmlReport
Install
$ npx -y skills add affaan-m/ecc --skill kotlin-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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
- Identify target code — Find the function, class, or module to test
- Write a Kotest spec — Choose a spec style (StringSpec, FunSpec, BehaviorSpec) matching the test scope
- Mock dependencies — Use MockK to isolate the unit under test
- Run tests (RED) — Verify the test fails with the expected error
- Implement code (GREEN) — Write minimal code to pass the test
- Refactor — Improve the implementation while keeping tests green
- Check coverage — Run
./gradlew koverHtmlReportand verify 80%+ coverage
Examples
The following sections contain detailed, runnable examples for each testing pattern:
Quick Reference
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, Java & JVM
- First seen
- Jul 14, 2026
Questions
What does the kotlin-testing skill help with?
The kotlin-testing skill provides Kotlin testing patterns using Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. It follows a TDD workflow with a red, green, refactor cycle and checks coverage with Kover.
How do I install the kotlin-testing skill?
Run npx -y skills add affaan-m/ecc --skill kotlin-testing -y in your project. This lets the agent write Kotlin tests with Kotest and MockK, and check coverage with ./gradlew koverHtmlReport.
Which other skills are in the Testing & QA category?
kotlin-testing ranks in the top 50 of the Testing & QA category on Claude Marketplaces. Other skills in this category include tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui.
Who is kotlin-testing for?
It is for developers writing Kotlin tests with Kotest or MockK, testing coroutines, or following TDD in Kotlin projects. It also covers adding test coverage to existing Kotlin code and configuring Kover.
More from affaan-m/ecc
All 257- Ai Regression Testing12.1K
- Browser Qa12.1K
- Design System12.1K
- Jira Integration12K
- Investor Outreach12K
- Documentation Lookup12K
- Remotion Video Creation12K
- Swift Actor Persistence12K
- Swift Protocol Di Testing12K
- Blueprint12K
- Git Workflow11.9K
- Foundation Models On Device11.9K
- Exa Search11.9K
- Swift Concurrency 6 211.9K
- Nestjs Patterns11.9K
- Data Scraper Agent11.9K
- Hexagonal Architecture11.9K
- Mcp Server Patterns11.9K
- Plankton Code Quality11.9K
- Fal Ai Media11.8K
- Visa Doc Translate11.8K
- Inventory Demand Planning11.8K
- Customs Trade Compliance11.8K
- Brand Voice11.8K
Similar to Kotlin Testing
More Testing & QArust-testingaffaan-m/ecc14.8K installsRust testing patterns covering unit, integration, async, property-based, and mocked tests under a TDD workflow.
quarkus-tddaffaan-m/ecc8.6K installsTest-driven development workflow for Quarkus 3.x services covering unit, Camel route, and coverage testing.
test-driven-developmentbobmatnyc/claude-mpm-skills412 installsLanguage-agnostic TDD guide covering red-green-refactor, test structure, mocking, and coverage targets for any stack.
java-testingpluginagentmarketplace/custom-plugin-java921 installsJava testing guide covering JUnit 5, Mockito, AssertJ, and Spring Boot integration tests with Testcontainers.
javascript-testing-patternswshobson/agents21.6K installsComprehensive testing guide covering Jest and Vitest setup, unit, async, and mocking patterns for JavaScript and TypeScript.