Application programming interfaces(API)
API stands for Application programming interfaces. API helps in data exchange/communication between two software applications/systems.
API acts as an interface that allows communication between two software applications.
How does API work
API works in a client-server architecture. When a client makes a request to a server first the request goes to the API, API will check the corresponding response from the server and serves it to you.
Take an example of booking a flight using goibibo application, For booking a flight we provide the source and destination, and travel dates, after providing it the application searches and displays the list of flights available.
The goibibo application uses the respective airlines API and displays the details of the availability of flight in the goibibo application
Web Services
Web Services works as a client-server application or application component for communication.
The method of communication between two devices over the network.
It is a collection of standards or protocols for exchanging information between two devices or applications.
Two ways web services can be implemented are
- REST
- SOAP
Both API and Web Services definition looks similar right? The main difference are
WebServices will always be accessible over the internet
Not all APIs are accessible over the internet
So all Webservices are APIs, but not all APIs are Web services.
API Testing
- API testing is a type of software testing that involves testing application programming interfaces (API's).
- API testing is a part of integration testing.
- API testing, our focus is on the Business Logic Layer of the software architecture.
When you look at the test pyramid, Integration testing stands second, so more focus on testing should be given to it by the testers.
- Unit Tests
- Integration Tests
- User Interface Tests
In Agile testing environment, API testing is considered a more important and suitable form of testing because API Testing handles complex functionality. Quick feedbacks in shorter iterations
We verify the below following aspects in the API testing,
- Response time of an API Request
- Quality and Accuracy of Data.
- Need to check the authorization of the request.
- HTTP status code and error codes.
- Valid error message in the response when resource is not found in the server.

Join the conversation! Your thoughts help the community grow.