springboot-tdd

Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.

Content Preview
---
name: springboot-tdd
description: Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.
---

# Spring Boot TDD ワークフロー

80%以上のカバレッジ(ユニット+統合)を持つSpring Bootサービスのためのテスト駆動開発ガイダンス。

## いつ使用するか

- 新機能やエンドポイント
- バグ修正やリファクタリング
- データアクセスロジックやセキュリティルールの追加

## ワークフロー

1) テストを最初に書く(失敗すべき)
2) テストを通すための最小限のコードを実装
3) テストをグリーンに保ちながらリファクタリング
4) カバレッジを強制(JaCoCo)

## ユニットテスト(JUnit 5 + Mockito)

```java
@ExtendW
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/springboot-tdd.md \
  https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/ja-JP/skills/springboot-tdd/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/affaan-m/everything-claude-code

Then reference at docs/ja-JP/skills/springboot-tdd/SKILL.md

Related Skills