What is API Testing

Definition

API testing verifies that application programming interfaces behave correctly by sending requests and validating responses, status codes, data, performance, and error handling directly at the interface layer, independent of any user interface.
« Back to Glossary Index
  • Validates business logic at the interface layer without a UI
  • Runs fast and is stable compared with UI-driven tests
  • Checks responses, status codes, error handling, and performance directly
  • Catches contract and integration issues between services early

Real World Example

A team writes API tests that send valid and invalid requests to their orders endpoint, asserting correct response bodies, status codes, and error messages, catching a broken validation rule before any UI work begins.

FAQs

What does API testing verify?

It verifies an API's responses, status codes, data correctness, error handling, and performance by sending requests directly to it.

Why test APIs rather than only the UI?

API tests are faster, more stable, and can validate logic and edge cases directly without depending on the user interface.

What tools support API testing?

Tools like Postman, REST Assured, and various HTTP client libraries are commonly used for API testing.

Hello popup window