API Testing · Middle · Question 10 of 75
Why simulate a slow dependency in an API test?
- 1To measure how fast the real dependency is
- 2To check timeouts, retries and error messages
- 3To make the test suite take longer on purpose
Show the answer
Correct answer: To check timeouts, retries and error messages
Explanation
A stub with a 10-second delay shows whether the service fails fast with a clear error or hangs until the client gives up.