test-suite-builder

Design layered Kotlin and Spring tests across unit, slice, and integration levels.

14|1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/Kotlin/kotlin-backend-agent-skills --skill test-suite-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-suite-builder
Source: https://github.com/Kotlin/kotlin-backend-agent-skills/tree/main/.agents/skills/test-suite-builder
Command: npx skills add https://github.com/Kotlin/kotlin-backend-agent-skills --skill test-suite-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design and generate layered Kotlin + Spring tests that balance speed, realism, and regression value across unit, slice, and integration levels. Use when adding coverage for business logic, controllers, repositories, security, serialization, or end-to-end workflows, and when generic AI output would otherwise overuse @SpringBootTest, misuse mocks, or ignore MockK and coroutine testing idioms.

Core Features & Use Cases

  • Create unit tests for domain logic, calculations, and deterministic branching.
  • Build slice tests for framework boundaries such as HTTP contracts, repositories, and security slices.
  • Compose integration tests that validate end-to-end flows with realistic infrastructure while avoiding unnecessary full-stack boots.

Quick Start

Generate an initial test plan and scaffold for unit, slice, and integration tests that align with the project style.

Frequently Asked Questions about test-suite-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure layered Kotlin Spring Boot tests to balance speed and realism?

Structure layered Kotlin Spring Boot tests by separating unit tests for business logic, slice tests for framework boundaries, and integration tests for end-to-end workflows. This approach balances speed, realism, and regression value while avoiding unnecessary full-stack boots.

When should I avoid using @SpringBootTest in my JUnit 5 integration testing?

Avoid using @SpringBootTest in JUnit 5 integration testing when validating specific framework boundaries like HTTP contracts or repositories. Overusing it boots the full application context unnecessarily; prefer slice tests to achieve faster execution and targeted regression value.

What is the best way to test Spring Boot controllers and repositories in Kotlin without booting the full stack?

The best way to test Spring Boot controllers and repositories in Kotlin without booting the full stack is using slice tests. Slice tests validate specific framework boundaries like HTTP contracts and data access layers, ensuring fast execution and focused regression value.

How do I use MockK and JUnit 5 for unit testing Kotlin domain logic and calculations?

Use MockK and JUnit 5 for unit testing Kotlin domain logic by creating deterministic tests for calculations and branching. Align with MockK and coroutine testing idioms to mock dependencies accurately, ensuring fast and isolated regression coverage for business logic.

Does this approach support writing integration tests for Kotlin coroutine workflows in Spring Boot?

Yes, this approach supports writing integration tests for Kotlin coroutine workflows in Spring Boot. It aligns with coroutine testing idioms to validate end-to-end flows realistically, ensuring that asynchronous business logic and serialization are properly covered without unnecessary mocks.

Why do my Kotlin Spring tests misuse mocks and ignore coroutine testing idioms?

Kotlin Spring tests often misuse mocks and ignore coroutine idioms when applying generic AI output or improper patterns. Align with MockK and JUnit 5 coroutine testing idioms to avoid over-mocking, ensuring tests validate realistic behavior across unit, slice, and integration levels.