spring-service-test
Writes the service layer tests of a use case (UC-XXX) in a Spring Boot application: every business rule with its allowed and its rejected case, every alternative flow the service decides, and the main success scenario, called on the @Service directly. Uses @SpringBootTest with the real persistence layer and a Testcontainers database, or plain unit tests with an in-memory fake of the outbound port in the business module of a hexagonal project. Classes are named UC001<Name>ServiceTest and every method carries @UseCase. Use when the user asks to "test the service layer", "test the business rules", "write service tests", "unit test the business logic", or mentions @SpringBootTest service tests, Testcontainers, domain exceptions, or business rule tests for a Spring Boot use case. Run by /use-case-test as the integration layer of a Hilla stack or a stack without an entry layer, or when the service layer is named; below a Vaadin Flow UI or a REST entry layer their tests cover the service. Can also be run directly.
Pinned to revision dbb4e27b6d25, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/spring-service-test/SKILL.md
- skills/spring-service-test/references/UC001RegisterGuestServiceTest.java.md
- skills/spring-service-test/references/markers.md
Every link opens the file at its source, pinned to the revision this page describes.