rrezartprebreza/spring-boot-skills / skills/spring-boot-3/testing-pyramid
testing-pyramid
VerifiedUse when writing tests of any kind — unit, slice, or integration. Covers test structure, naming conventions, Mockito patterns, @WebMvcTest, @DataJpaTest, and Testcontainers setup.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.2 KB |
| agents/openai.yaml | config | 197 B |
| examples/bad-controller-test.java | other | 142 B |
| examples/good-controller-test.java | other | 401 B |
examples/good-controller-test.java
View on GitHub// GOOD — controller slice: only the web layer, collaborators mocked with @MockitoBean.
// Writes need .with(csrf()): @WebMvcTest applies Boot's default security (CSRF on), and
// @WithMockUser only authenticates — without csrf() every POST/PUT/DELETE returns 403.
@WebMvcTest(OrderController.class)
class OrderControllerTest {
@Autowired MockMvc mvc;
@MockitoBean OrderService service;
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |