← ClaudeAtlas

kora-testing-junit-kotlinlisted

In-process JUnit 5 tests for Kotlin Kora services — @KoraAppTest, @TestComponent, MockK, config/graph modifiers, coroutine tests, Testcontainers. Use when testing a Kotlin Kora graph. For Java see kora-testing-junit-java.
kora-projects/kora-skills · ★ 1 · Testing & QA · score 72
Install: claude install-skill kora-projects/kora-skills
# Kora Testing JUnit (Kotlin) > **Kora sub-skill — obey the [kora-v1 meta rules](../../SKILL.md) on every task:** **R0** ensure `.kora-agent/` docs+examples are cloned · **R1** read this sub-skill before writing code · **R2** Kora APIs only — no Spring/Micronaut/Quarkus, no invented annotations or config keys · **R3** journal any incorrect Kora usage. Add comments/Javadoc only if asked. In-process JUnit 5 tests that build a real Kora application Graph at compile time and inject its components into the test. `@KoraAppTest` reads a `@KoraApp` interface, builds only the slice of the Graph reachable from the requested `@TestComponent`s, and hands those components to the test. There is no reflection-based runtime container — the same generated `*Graph` code used in production runs in the test. Read this first when: - writing the first component test for a Kora Kotlin service, - mocking a graph dependency with `@MockK` + `@TestComponent`, - overriding config via `KoraAppTestConfigModifier`, - adding or replacing a component via `KoraAppTestGraphModifier`, - adding test-only repositories through the `TestApplication` submodule pattern, - wiring a PostgreSQL Testcontainer into a `@KoraAppTest`. ## Quick Start ### 1. Dependencies (`build.gradle.kts`) All Kora artifacts inherit their version from the `kora-parent` BOM — never pin a `ru.tinkoff.kora:*` version individually. ```kotlin dependencies { // BOM already applied in the project (ru.tinkoff.kora:kora-parent) ksp("r