kotlin-testing
Installation
SKILL.md
Kotlin Testing
Tests prove observable contracts. Coverage measures exercised structure but does not prove migration completeness or behavioral equivalence.
Test design
- Name the contract, source test, defect, risk, or incident each test protects.
- Assert values, typed failures, ordering, state transitions, side effects, call counts, serialization bytes, cleanup, or externally observable timing boundaries.
- Prefer real values and fakes at owned boundaries. Mock only costly or nondeterministic collaborators.
- Use table/property tests for input partitions; retain each source case identity during migrations.
- For coroutines, use virtual time and event-driven coordination. Never use unbounded waits or fixed sleeps as synchronization.
- Reuse adapter conformance suites so every implementation receives the same contract assertions plus adapter-native tests.
- Keep fixtures versioned and deterministic. Record seeds, locale, timezone, encoding, and platform assumptions.