Performance: TestRestTemplate for full integration
MEDIUM IMPACT
This affects the speed and responsiveness of full integration tests by simulating real HTTP requests and responses.
Using TestRestTemplate to perform real HTTP calls against a running server in integration tests.Using MockMvc for all tests including full integration tests that require actual HTTP calls and context loading.
| Pattern | Network Simulation | Serialization Cost | Test Execution Time | Verdict |
|---|---|---|---|---|
| MockMvc for all tests | No network simulation | Minimal serialization | Fast (milliseconds) | [X] Bad for full integration |
| TestRestTemplate for full integration | Full network simulation | Full serialization | Slower (seconds) | [OK] Good for realistic integration |