Performance: MockMvc for HTTP assertions
MEDIUM IMPACT
This affects backend test execution speed and resource usage during HTTP request simulations.
Use MockMvc to perform HTTP requests directly against the controller layer without starting the server.
Start the full Spring Boot server and use RestTemplate or WebClient to send HTTP requests for tests.
| Pattern | Server Startup | Network Overhead | Test Execution Time | Verdict |
|---|---|---|---|---|
| Full server start + HTTP client | Yes (seconds) | Yes (milliseconds) | Slow (seconds per test) | [X] Bad |
| MockMvc in-memory requests | No | No | Fast (milliseconds per test) | [OK] Good |