APIs can timeout or return exceptions i.e. HTTP 5XX statuses like 500, 503, 504. Should a QE test these scenarios? If yes, then how can we test it? So far, I have never seen ways to simulate the conditions which would cause http 5xx to be returned. I feel that such scenarios should be covered by unit tests of the developers. I think it is not worth the effort to test such things.
Example - Say that my API1 needs an external API2 to do some work. API1 can return a 5xx code when it has a problem or when API2 has a problem. When there are no ways to simulate either scenario, then how do I test those scenarios? Wouldn’t that require the developers to add some testability features to simulate those scenarios? Is it really worth the trouble?