Claude-skill-registry backend-testing
Write and review backend tests with JUnit5, MockMvc, and Spring Boot Test. Use for writing controller tests, service tests, and integration tests.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/backend-testing" ~/.claude/skills/majiayu000-claude-skill-registry-backend-testing && rm -rf "$T"
manifest:
skills/data/backend-testing/SKILL.mdsource content
Backend Testing Skill
When to Use
- Writing unit tests for services or repositories
- Writing controller tests with MockMvc
- Writing integration tests
- Reviewing test coverage or test quality
Stack
- JUnit5 + Spring Boot Test
- MockMvc for controller tests
- (Optional) Testcontainers for integration tests
Minimum Requirements
Each endpoint requires:
- At least 1 success test
- At least 1 failure test
Document important endpoints with Spring REST Docs.
What to Test
- Validation errors - Invalid input handling
- Authorization errors - If applicable
- Idempotency behaviors - Duplicate request handling
- TTL expiry behaviors - Session/token expiration
Test Organization
src/test/java/ ├── controller/ │ └── {Feature}ControllerTest.java ├── service/ │ └── {Feature}ServiceTest.java └── integration/ └── {Feature}IntegrationTest.java
Test Naming Convention
@Test void should_ReturnSuccess_When_ValidInput() { } @Test void should_ThrowException_When_InvalidInput() { }