API Testing · Senior · Question 56 of 75
How do you test that an API degrades gracefully when a non-critical dependency fails?
- 1Graceful degradation is a UI feature and not tested in APIs
- 2Fail it and check the core response still works with a fallback
- 3Fail all dependencies and check the API returns 500 quickly
Show the answer
Correct answer: Fail it and check the core response still works with a fallback
Explanation
A product page should still return when recommendations are down, maybe without that section. Fault injection proves it.