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.