springboot-tdd
Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.
npx skills add mturac/everything-openai-codex --skill springboot-tdd --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Spring Boot TDD Workflow TDD guidance for Spring Boot services with 80%+ coverage (unit + integration). ## When to Use - New features or endpoints - Bug fixes or refactors - Adding data access logic or security rules ## Workflow 1) Write tests first (they should fail) 2) Implement minimal code to pass 3) Refactor with tests green 4) Enforce coverage (JaCoCo) ## Unit Tests (JUnit 5 + Mockito) ```java @ExtendWith(MockitoExtension.class) class MarketServiceTest { @Mock MarketRepository repo; @InjectMocks MarketService service; @Test void createsMarket() { CreateMarketRequest req = new CreateMarketRequest("name", "desc", Instant.now(), List.of("cat")); when(repo.save(any())).thenAnswer(inv -> inv.getArgument(0)); Market result = service.create(req); assertThat(result.name()).isEqualTo("name"); verify(repo).save(any()); } } ``` Patterns: - Arrange-Act-Assert - Avoid partial mocks; prefer explicit stubbing - Use `@ParameterizedTest` for variants ## Web Layer Tests (MockMvc) ```java @WebMvcTest(MarketController.class) class MarketControllerTest { @Autowired MockMvc mockMvc; @MockBean MarketService marketService; @Test void returnsMarkets() throws Exception { when(marketService.list(any(
- When to Use
- Workflow
- Unit Tests (JUnit 5 + Mockito)
- Web Layer Tests (MockMvc)
- Integration Tests (SpringBootTest)
- Persistence Tests (DataJpaTest)
- Testcontainers
- Coverage (JaCoCo)
- Assertions
- Test Data Builders
- CI Commands
What does the springboot-tdd skill do?
Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.
How do I install it?
Run `npx skills add mturac/everything-openai-codex --skill springboot-tdd --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
