spring-boot-testing
Installation
SKILL.md
When to Use
- Writing tests for Spring Boot applications
- Need help choosing the right test slice
- Setting up test infrastructure
- Working with MockMvc, TestRestTemplate, or RestTestClient
- Writing integration tests with Testcontainers
Instructions
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