There can be multiple reasons for performing API testing.
Let us see some common test examples, where this form of testing is used to verify:
- Any data structure updated by API which requires proper validation.
- Input condition-based return values.
- Call to another API or if any other event is triggered or some interruption is raised.
- The return values can also be null or wrong results.
- Modification of some resources like an update of the database, process killing, etc.