add-component-test-layer

Community

Add fast component tests to Spring Boot

Authordprice-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the problem of adding fast, slice-based verification for a Spring Boot 4 app without running full end-to-end servers, so controller wiring, actuator endpoints, and security-related behavior can be tested quickly and consistently.

Core Features & Use Cases

  • Component test source set: Adds a dedicated componentTest source set plus Gradle configuration inheritance from the testImplementation/testRuntimeOnly configurations.
  • Test task integration: Registers a componentTest Gradle task and wires it into tasks.check, including JaCoCo report/coverage verification ordering.
  • Actuator health coverage: Creates an ActuatorHealthTests class and ensures application.yml is configured to expose health endpoints with probe support.
  • Use Case: After implementing controller or actuator health changes, add @WebMvcTest/@SpringBootTest(MOCK) infrastructure and verify endpoints like /actuator/health, /liveness, and /readiness run as part of the component test tier.

Quick Start

Run the add-component-test-layer skill in your Spring Boot 4 repository to create the componentTest source set, configure the Gradle test task and JaCoCo, and generate ActuatorHealthTests plus the required actuator health configuration.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-component-test-layer
Download link: https://github.com/dprice-dev/claude-java-skills/archive/main.zip#add-component-test-layer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.