add-component-test-layer
CommunityAdd fast component tests to Spring Boot
Software Engineering#component tests#spring boot 4#resttestclient#webmvc test#actuator health#gradle multi-source-set
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
componentTestsource set plus Gradle configuration inheritance from thetestImplementation/testRuntimeOnlyconfigurations. - Test task integration: Registers a
componentTestGradle task and wires it intotasks.check, including JaCoCo report/coverage verification ordering. - Actuator health coverage: Creates an
ActuatorHealthTestsclass and ensuresapplication.ymlis 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/readinessrun 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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.