testing-strategies

Standardize Micronaut/Kotlin backend tests with MockK, runTest, and Retrofit.

96|9|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/c0x12c/ai-toolkit --skill testing-strategies-c0x12c
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-strategies
Source: https://github.com/c0x12c/ai-toolkit/tree/main/.codex/skills/testing-strategies
Command: npx skills add https://github.com/c0x12c/ai-toolkit --skill testing-strategies-c0x12c

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinated testing patterns for Micronaut/Kotlin backends reduce ambiguity and improve coverage by providing a reusable blueprint for repository, integration, and data-builder tests.

Core Features & Use Cases

  • Integration tests with Retrofit-based clients and MicronautTest scaffolding to validate end-to-end flows.
  • Repository tests leveraging AbstractRepositoryTest and consistent test data builders.
  • MockK-based unit tests with coroutine-safe patterns and clear AAA structure.
  • Reference patterns and setup documentation linked via integration-test-setup.md and examples.md.

Quick Start

Install the skill and begin applying repo/integration/test-data-builder patterns to your backend tests.

Frequently Asked Questions about testing-strategies

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

FAQPage Schema
How do I structure integration tests for a Micronaut and Kotlin backend?

Integration tests for a Micronaut and Kotlin backend should use Retrofit-based clients and MicronautTest scaffolding to validate end-to-end flows, ensuring consistent execution across your services.

What is the best way to mock dependencies in Kotlin coroutine unit tests?

Mocking dependencies in Kotlin coroutine unit tests is best handled using MockK alongside runTest, ensuring coroutine-safe execution while maintaining a clear Arrange-Act-Assert structure.

How do I set up repository tests with consistent data builders in Micronaut?

Repository tests in Micronaut should leverage AbstractRepositoryTest alongside consistent test data builders, providing a reusable blueprint that standardizes setup and reduces ambiguity across test cases.

Does this testing approach work with Retrofit and MockK together in the same project?

Yes, this testing approach works with Retrofit and MockK together, specifying conventions for using Retrofit-based integration tests and MockK for mocks within Micronaut and Kotlin backends.

What limitations exist when standardizing testing patterns across unit and integration layers?

Limitations include dependency on specific frameworks, requiring Micronaut and Kotlin, and adherence to predefined patterns like runTest for coroutines and Retrofit for clients to maintain consistency.