java-spring-boot-testing
Installation
SKILL.md
Spring Boot Testing
Guide to testing strategies and examples for Spring Boot applications.
When to Use This Skill
- Write unit tests for services and components (JUnit 5 + Mockito)
- Write controller tests: unit (standalone MockMVC) or integration (@WebMvcTest, @SpringBootTest)
- Test JPA repositories with
@DataJpaTest - Use Testcontainers for real database integration tests
- Implement Consumer Driven Contracts with Spring Cloud Contract
- Diagnose or simulate thread pool starvation
- Benchmark performance with JMH