| name | spring-testing |
| description | Spring Boot test automation skill. Covers unit testing, integration testing, MockMvc, Mockito, test slices, and test-driven development workflows. USE FOR: writing tests, test failures, test coverage, TDD, MockMvc, Mockito.
|
Spring Testing Skill
See testing.instructions.md for patterns (unit, integration, data tests).
Commands
./mvnw test
./mvnw test -Dtest=ClassName
./mvnw test -Dtest=ClassName#methodName
./mvnw test -Dtest="com.example.demo.**"
./mvnw verify
Debugging Test Failures
- Read the full stack trace
- Check setup issues (missing mock, wrong config) vs code issues
- Run with
-X for debug output: ./mvnw test -X -Dtest=ClassName
- Add
@Disabled("reason") temporarily to isolate failures