1
Fundamentals
What is an API, and what is API testing?
An API (Application Programming Interface) is a contract that lets two pieces of software talk: one sends a *request*, the other sends back a *response* — neither needs to know the other's internals.
API testing checks that this layer behaves correctly — right data, right status codes, proper error handling, security, and speed — all *without a UI*.
Example:
``
API testing verifies that response: correct status, correct fields, correct values.
API testing checks that this layer behaves correctly — right data, right status codes, proper error handling, security, and speed — all *without a UI*.
Example:
``
http
GET /users/123
`
`json
{ "id": 123, "name": "Asha", "active": true }
``API testing verifies that response: correct status, correct fields, correct values.
💡 Plain English: An API is a **restaurant waiter**. You (one app) give your order (request); the waiter takes it to the kitchen (another system) and brings back your food (response) — you never enter the kitchen. API testing is checking the waiter brings the right dish, handles "we're out of that" politely, and is quick.