Basic API Testing Questions
Basic API Testing Questions
API testing is the process of verifying the functionality, reliability, performance, and security
of an Application Programming Interface (API). It ensures data exchange between services
works correctly without a UI. It's important because APIs are the backbone of modern
applications.
GraphQL API
gRPC API
WebSockets API
7. What is the meaning of 201, 204, 400, 401, and 500 response codes?
Open Postman
Authorization – Verifies what you can access (e.g., admin vs. regular user)
Swagger helps developers and testers understand API endpoints, parameters, request
methods, and response formats with interactive testing options.
14. How do you test APIs with authentication (OAuth, JWT, Basic Auth)?
A contract defines request format, response format, methods, and error handling for an
API.
Asynchronous API – Client sends request and continues working (e.g., WebSockets,
message queues)
Mocking simulates API responses before the real API is available using tools like WireMock
or Mockoon.
Use JMeter, Gatling, or LoadRunner to simulate high user loads and measure response
times.
Using tools like REST Assured, Postman (Newman), or Karate to automate API requests and
assertions.
24. How do you verify data consistency between API requests and the database?
25. What are WebSockets, and how do they differ from REST APIs?
WebSockets provide real-time bidirectional communication, while REST APIs use stateless
HTTP requests.