Our CI/CD pipeline requires integration tests to pass in order to merge a branch to main.
A team I’ve started working with has had an issue with integration tests failing at times due to external systems over which we have no control. This causes some frustration as code changes build up until the external system returns to normal operation.
Is this a problem that has common solutions, and if so what are they? Or do the solutions tend to be unique to the environment such that it would be difficult to offer general advice or point to standard patterns for dealing with this dilemma?
Some context for our situation: the integration test calls an API we have control over, and that API in turn calls the external component. In an ideal world, maybe it could fall back to a mock server for the external component when it’s down; but that would be difficult to implement due to the fact that it would require code changes in the application to enable behavior that I don’t think you would want to put there. For example, you wouldn’t want to deploy code like that to production. You could make it conditional based on environment, but then maybe you are beginning to get into an area of complexity that outweighs the benefit.
It seems this has to be a common problem… but I don’t have enough of a background in QA & Testing to know whether it’s one that comes with standard solutions.
Source: Read More