Spring Boot TDD Skill for MockMvc Request Validation
Start from a failing web test and implement a minimal controller validation rule with a successful request case.
中文Install in Claude Code
Use your Spring Boot project, Spring Test, MockMvc, and synthetic create requests. Reuse the project's Bean Validation setup.
- Get the complete `skills/springboot-tdd` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/springboot-tdd/SKILL.md`, start Claude Code at the project root, and call `/springboot-tdd`.
Example task
Require title on POST /books. Send an empty title and expect 400. Send Demo Book and verify the project's success status.What to check
The empty request fails at the expected HTTP boundary and the valid request succeeds. The tests document both cases.
Original SKILL.md on GitHub · Updated
Frequently asked question
Is a service unit test enough?
Add a web-layer test when you need to verify HTTP mapping and statuses. Keep service tests for independent business rules.