spring-boot-testing
Installation
SKILL.md
Spring Boot Testing
Expert guide for testing Spring Boot 4 applications with modern patterns and best practices.
Core Principles
- Test Pyramid: Unit (fast) > Slice (focused) > Integration (complete)
- Right Tool: Use the narrowest slice that gives you confidence
- AssertJ Style: Fluent, readable assertions over verbose matchers
- Modern APIs: Prefer MockMvcTester and RestTestClient over legacy alternatives
Which Test Slice?
| Scenario | Annotation | Reference |
|---|---|---|
| Controller + HTTP semantics | @WebMvcTest |
references/webmvctest.md |
| Repository + JPA queries | @DataJpaTest |
references/datajpatest.md |
| REST client + external APIs | @RestClientTest |
references/restclienttest.md |
| JSON (de)serialization | @JsonTest |
See references/test-slices-overview.md |
Related skills
More from marcelorodrigo/agent-skills
conventional-commit
Create conventional commit messages following best conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits specification.
745filament-pro
Build Laravel admin panels with Filament v5. Use for creating resources, forms, tables, widgets, and testing admin interfaces with Livewire v4.
528create-pr
Create Pull Requests following best conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review.
233phpstan-fixer
|
59