After a few days researching API testing, I have some general ideas to share to some who are still newbies to it:
1. What is API?
API stands for Application Programming Interface. Talking in technical terms an API is a set of procedures, functions, and other points of access which an application, an operating system, a library etc., makes available to programmers in order to allow it to interact with other software.
Given an analogy to make it more easier to understand:
Let say you went to a restaurant. There is no waiter present, so you need to see the menu lying on the table and then make a request to the kitchen where the chef will prepare the dish for you. But it does not always work that way. What if the dish is not available? You will have to go to your seat again and decide something else. There will be many customers present in the restaurant which will slow the process of the chef since now he will be listening to the orders instead of preparing them. Also how can we forget we live in this multilingual world. What if you do not understand the chef’s language?
In this scenario, a waiter is necessary and he is playing a role like an API that takes a request from a customer, sends it to the chef and in response bring in the food to the customer. If the dish is not available, the waiter will tell the customer.
Meanwhile, the waiter is speaking the language that both customers and chefs understand.
In general,you make the requests while the waiter works as an API who is an intermediary and takes the request to the appropriate server. This server will be processing your request and responding back to you. As said above, your server or application is the chef who is in the kitchen. He will process your request, cook your desired food and present it back to you as a response. This is how API works.
2. What is API testing? Why API testing?
API testing is a type of software testing that involves testing APIs directly and also as a part of integration testing to check whether the API meets expectations in terms of functionality, reliability, performance, and security of an application. In API Testing our main focus will be on Business logic layer of the software architecture.
Why we need to use API testing?
Before, Testing would often take place at the GUI level. This often leads to the facts that enginneers have short time to test their products, critical bugs cannot be detected early which take a lot of efforts to fix.
In the age of agile, to adapt quick releases and versatile needs from customers, testing must happen at the lower level. While GUI is not ready, teams still are able to test their product effectively.
3. What needs to be verified in API testing?
- Data accuracy
- HTTP status codes
- Response time
- Error codes in case API returns any errors
- Authorization checks
- Non functional testing such as performance testing, security testing
For more details, please refer here:
These are my understanding on API testing, what about yours? 





