There are 2 approaches for this issue...
your app is live in production with real user traffic:
if you have an app in production that has live traffic and depends on an external api you have no choice but to closely monitor and have good thresholds to know as fast as possible when the external api makes changes without notifying.
you should always take into account that :
- api's change over time
- the api vendor can have bugs
- api vendors test-kits can have bugs or not fully cover all the production api's functionality
your app is an installation and has planned version/releases:
in this case you have a grace period to fail... live user aren't effected immediately of the external api breaking changes.
in my opinion this is a more easy task. write a test (full end-to-end test) that makes real transactions/http/requests to you application that invoke the external api and check that there are no failures. no test-kits no mocks real transaction.
after this task is done you can choose to run this every 24H , 1 min etc...
good practices:
- automate everything
- have a person you can quickly contact from the vendor of the external api
- dont blindly trust the vendor test everything
- fail fast - if your service depends heavily on the external api dont let your service crash. fail fast and return proper error messages
tools: