What problem does it solve?
It solves the challenge of writing consistent, maintainable Kotlin tests by providing an end-to-end set of patterns for TDD, mocking, coroutine testing, property-based testing, and coverage targets.
Core Features & Use Cases
- TDD workflow with Kotest: Guides a RED-GREEN-REFACTOR cycle from failing specs to minimal implementation, then refactoring while keeping tests green (e.g., validator or service logic).
- MockK-driven isolation: Shows how to mock dependencies for both regular and suspending functions using
every/verify, coEvery/coVerify, and argument capture.
- Coroutine and Flow test patterns: Covers
runTest, TestDispatcher, virtual time (advanceTimeBy), and testing Flow emissions deterministically.
- Property-based and data-driven testing: Demonstrates Kotest property testing and
withData for systematic input coverage.
- Kover coverage enforcement: Provides practical Gradle configuration and commands to verify minimum coverage thresholds (e.g., 80%+), including CI-oriented steps.
Quick Start
Ask the assistant to generate a Kotest+MockK test spec for your Kotlin function using a RED-GREEN-REFACTOR TDD flow and include coroutine-safe patterns if the function is suspendable.