testing-patterns
Installation
SKILL.md
Testing Patterns Skill
Testing strategies for Spring Boot applications. Always write both positive and negative test cases.
When to Use
- "write tests" / "add test coverage" / "test this"
- Test failures or debugging test issues
- Choosing between unit, slice, and integration tests
Test Pyramid
| Level | Annotation | Speed | Scope | When to Use |
|---|---|---|---|---|
| Unit | @ExtendWith(MockitoExtension.class) |
Fast | Single class | Business logic in services |
| Slice | @WebMvcTest, @DataJpaTest |
Medium | One layer | Controllers, repositories |
| Integration | @SpringBootTest |
Slow | Full app | End-to-end flows, cross-layer |