Testing Resources Logo

API Testing - Key Test Cases for Validating Web Services and Integrations

API testing is crucial for ensuring reliable communication between different software components. This guide provides comprehensive test cases for API endpoints, covering request validation, response handling, error scenarios, authentication, rate limiting, and data integrity verification.

NrTest Idea
1Check what documentation is available about API. Is documentation correct and up to date?
2If testing third-party API then check if they have a testing environment that you can use and if they have all the necessary test data
3If testing third-party API then check if queries are free or you have to pay for the queries the system makes - maybe there should be some kind of limit how many queries end-user can do
4Check that all necessary values that come from API are saved to your system
5Check if API always sends the values that are mandatory for your system
6If your system uses specific values for certain fields then check that mapping between your system and third-party is correct and covers all the values
7Check if the field history is created when values are changed by API request
8Check if correct created_by and updated_by values are recorded in database rows that were created or updated by API request
9Check full responses returned from the API for anything suspicious that needs more exploring
10Check if requests and responses are logged somewhere and if they are allowed to be logged (private data)
11If you save requests and responses to somewhere then how easy it is to correlate them with data in our system (for investigating problems)
12Check how your system behaves with different error messages returned from API
13Check if all the error messages from the API are clear enough
14Check if response time from API is acceptable
15Check how your system behaves if a request to API gets a timeout
16If the user can initiate requests to API then check whether there should be an option to cancel waiting for the response
17Check that API can handle the load your system will generate