springboot-tdd

Apply red-green-refactor TDD workflows to Spring Boot applications with JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo.

2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/sayasaya8039/ZWG_Terminal --skill springboot-tdd-sayasaya8039
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: springboot-tdd
Source: https://github.com/sayasaya8039/ZWG_Terminal/tree/main/.claude/skills/springboot-tdd
Command: npx skills add https://github.com/sayasaya8039/ZWG_Terminal --skill springboot-tdd-sayasaya8039

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the common pain of writing fragmented, low-coverage tests for Spring Boot applications, which leads to fragile code, missed edge cases, and time-consuming debugging of production issues.

Core Features & Use Cases

  • Standardized TDD Workflow: Step-by-step red-green-refactor guidance for new features, bug fixes, and refactoring tasks.
  • Multi-Layer Test Templates: Pre-built, production-ready patterns for unit tests (JUnit 5 + Mockito), web layer tests (MockMvc), integration tests, and persistence tests (DataJpaTest + Testcontainers).
  • Coverage Enforcement: Built-in JaCoCo configuration and CI command snippets to reliably hit 80%+ test coverage thresholds. Use case: For example, when adding a new REST endpoint for a market service, use this Skill to write failing MockMvc tests first, implement the controller logic, and verify coverage meets team requirements before merging.

Quick Start

Use the springboot-tdd skill to write a failing unit test for a new Spring Boot service method before implementing the method logic.

Frequently Asked Questions about springboot-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I achieve 80% test coverage in Spring Boot using JUnit 5 and JaCoCo?

To achieve 80% test coverage in Spring Boot, apply standardized TDD workflows using JUnit 5 and JaCoCo. This approach provides built-in configuration and CI command snippets to reliably enforce coverage thresholds for new features and refactoring tasks.

What is the best way to write integration tests for Spring Boot with Testcontainers?

The best way to write integration tests for Spring Boot with Testcontainers is by applying pre-built, production-ready test templates. These templates standardize persistence testing with DataJpaTest to eliminate fragmented tests and reduce fragile code.

Can I use MockMvc for test-driven development of new REST endpoints?

Yes, you can use MockMvc for test-driven development of new REST endpoints. The workflow guides you to write failing MockMvc tests first, implement the controller logic, and verify coverage meets requirements before merging.

How does Mockito fit into a Spring Boot TDD workflow for bug resolution?

Mockito fits into a Spring Boot TDD workflow for bug resolution by providing standardized unit test templates. These templates guide the red-green-refactor process to catch edge cases and resolve bugs without creating low-coverage test suites.

Do I need Testcontainers and MockMvc together for Spring Boot testing?

You need Testcontainers and MockMvc together for comprehensive Spring Boot testing. Testcontainers handles persistence layer integration tests with DataJpaTest, while MockMvc handles web layer tests, ensuring combined unit and integration coverage.