SKILL

springboot-tdd

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

Target: Software development & testing. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original Japanese text

Topics in the source

  • Spring Boot TDD ワークフロー
  • いつ使用するか
  • ワークフロー
  • ユニットテスト(JUnit 5 + Mockito)
  • Webレイヤーテスト(MockMvc)
  • 統合テスト(SpringBootTest)
  • 永続化テスト(DataJpaTest)
  • Testcontainers

80%以上のカバレッジ(ユニット+統合)を持つSpring Bootサービスのためのテスト駆動開発ガイダンス。 新機能やエンドポイント バグ修正やリファクタリング データアクセスロジックやセキュリティルールの追加 1) テストを最初に書く(失敗すべき) 2) テストを通すための最小限のコードを実装 3) テストをグリーンに保ちながらリファクタリング 4) カバレッジを強制(JaCoCo) パターン: Arrange-Act-Assert 部分モックを避ける。明示的なスタビングを優先 バリエーションに@ParameterizedTestを使用 本番環境を反映するためにPostgres/Redis用の再利用可能なコンテナを使用 @DynamicPropertySource経由でJDBC URLをSpringコンテキストに注入 Mavenスニペット: 可読性のためにAssertJ(assertThat)を優先 JSONレスポンスにはjsonPathを使用 例外には: assertThatThrownBy(...) Maven: mvn -T 4 test または mvn verify Gradle: ./gradlew test jacocoTestReport 覚えておいてください: テストは高速で、分離され、決定論的に保ちます。実装の詳細ではなく、動作をテストします。

Source repository
affaan-m/ECC
Source file
docs/ja-JP/skills/springboot-tdd/SKILL.md
Fixed revision
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:49.722Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.