test-application-service

Generate pure MockK unit tests for Kotlin application-layer use-case services.

3|Updated Feb 6, 2025
One-click install
npx skills add https://github.com/emaarco/easy-zeebe --skill test-application-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-application-service
Source: https://github.com/emaarco/easy-zeebe/tree/main/.claude/skills/test-application-service
Command: npx skills add https://github.com/emaarco/easy-zeebe --skill test-application-service

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of pure mockk unit tests for application-layer use-case services, ensuring code quality and maintainability without requiring a Spring context.

Core Features & Use Cases

  • Automated Test Generation: Creates unit tests following a given/when/then pattern with confirmVerified.
  • Domain Test Builders: Utilizes predefined test builders for consistent and deterministic test data.
  • Fixed UUIDs: Employs fixed UUID strings for reproducible test results.
  • Use Case: When a new application service is developed, this Skill can instantly generate its corresponding unit test file, adhering to project-specific testing conventions.

Quick Start

Use the test-application-service skill to generate a unit test for the file at 'src/main/kotlin/com/example/MyService.kt'.

Frequently Asked Questions about test-application-service

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

FAQPage Schema
How do I generate mockk unit tests for Kotlin application services?

This Skill generates mockk unit tests for Kotlin application services by identifying service classes, dependencies, and domain value types. It creates test files using a given/when/then pattern with confirmVerified and fixed UUIDs for deterministic results.

Can I generate unit tests for Kotlin use cases without loading a Spring context?

Yes, you can generate pure mockk unit tests for Kotlin application services without a Spring context. This Skill isolates application-layer use-case logic by utilizing domain test builders and mocking dependencies directly, ensuring fast and independent test execution.

What is the given/when/then pattern for mockk unit tests in Kotlin?

The given/when/then pattern structures mockk unit tests into setup, execution, and verification phases. This Skill applies this pattern automatically, using confirmVerified to ensure all mock interactions are explicitly tested, alongside fixed UUID strings for reproducible test data.

Does this test generation approach work with domain test builders and fixed UUIDs?

Yes, this test generation approach works with domain test builders and fixed UUIDs. It utilizes predefined builders to construct consistent test data and employs fixed UUID strings to guarantee reproducible test results across multiple test runs.

How do I ensure my Kotlin application service tests mirror production code?

To ensure Kotlin application service tests mirror production code, this Skill analyzes your service classes, dependencies, methods, and domain value types. It then generates comprehensive tests that reflect the actual production logic and project testing conventions.