Modernize Kotlin test code

Proprietary

Find Kotlin-specific test patterns: mockito-kotlin usage where mockk would be idiomatic, deprecated runBlocking / TestCoroutineDispatcher patterns, Kotest assertion migration candidates, empty / assertion-less / many-assertion test bodies, snake_case test names, and Hamcrest call sites that fluent assertion libraries (AssertJ, Kotest) replace cleanly. Each match is a SearchResult for review — nothing is rewritten automatically. For bulk JUnit 4 → JUnit 5 annotation/assertion migration, apply JUnit4to5Migration from rewrite-testing-frameworks.

org.openrewrite.kotlin.testing.Testing$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.testing.Testing$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find public modifier on JUnit 5 test functions
  2. Find Kotest migration candidates
  3. Find mockito-kotlin / Mockito patterns
  4. Find coroutine-test patterns
  5. Find test fixture / setup smells
  6. Find assertion-library smells
  7. Find JUnit 5 setup smells (informational)