Skip to content
Quality Assurance Labs
QA Testing

API Testing — The QA Type Most Teams Ignore

Kawsher, Founder, QA Labs7 min readPublished Updated

API failures are invisible to users — until they aren't. A payment doesn't process. An account doesn't save. Data corrupts silently. This post covers what API testing catches, how to run it, and why most teams skip it at their peril.

Magnifier inspecting disconnected API connectors
  • API-testing
  • REST
  • GraphQL
  • Postman
  • backend-testing

Short answer

API testing checks the endpoints behind your app directly: that they return the right data, enforce authentication and permissions, and handle timeouts and bad input. It catches failures users cannot see until data is wrong or a payment fails. Test every endpoint for auth, timeouts and edge cases, and run the tests in CI.

Key takeaways

  • API bugs are invisible until they're catastrophic
  • Every endpoint needs tests for auth, timeouts, and edge cases
  • Add API tests to your CI pipeline — not just manual runs
  • Postman + Newman is the fastest way to start
  • Track API-specific escape rate, not just overall bug count

Your UI might look perfect. Your flows might test beautifully. But if your APIs fail silently, none of that matters.

API failures are the most expensive bugs in software. They're invisible to users until suddenly their data is wrong, their payment didn't process, or their account didn't save. And by the time you notice, the damage is already done.

This post explains what API testing actually catches, how to run it, and why it's the discipline most teams skip.

What does API testing catch?

  • Endpoints that return 200 but wrong data — The worst kind of bug. Nothing flags; everything looks fine; the data is silently corrupted.
  • Timeout failures under real-world load — APIs that work in dev but time out under real traffic.
  • Missing authentication on protected routes — Endpoints that should require auth but don't.
  • Data corruption from concurrent requests — Two requests hitting the same resource simultaneously and corrupting state.
  • Third-party integration failures — External APIs that break on edge inputs you didn't test.
  • Rate limiting issues — You hit a limit at scale that never showed up in dev.

None of these will be caught by your UI tests. All of them will reach production if you don't test the API layer directly.

Why do teams skip API testing?

  • The UI is what users see — so UI testing feels more important
  • API testing requires tooling most QA teams don't have
  • It feels abstract compared to "click this button, verify this text"
  • It's easy to assume the backend team already tested their code (they didn't — they tested unit logic, not integrated API behavior)

How do you start API testing?

  • Map every endpoint your app depends on. Every route, every method, every parameter.
  • Test each with Postman or Newman. Start with happy paths, then add edge cases.
  • Add edge cases: missing auth headers, expired tokens, malformed JSON, timeouts, concurrent requests, boundary values (0, negative, huge, empty).
  • Run in CI. Every commit should trigger the API test suite.
  • Report with request/response evidence.

Tooling

  • Postman + Newman — The fastest way to start. Postman for authoring, Newman for CI.
  • RestAssured (Java) or Pytest + requests (Python) — If your team writes code-level tests.
  • Insomnia — A lighter alternative to Postman with a cleaner UI.
  • k6 — For load and performance testing of APIs.

What to measure

  • Endpoint coverage — % of endpoints with at least one test
  • Edge case coverage — % of endpoints testing auth, timeouts, concurrency
  • Escaped API defects — API bugs found in production vs. caught pre-release
  • API response time — P50, P95, P99 across endpoints

What types of API tests are there?

  • Functional tests — Each endpoint returns the right status code, body and side effects for valid and invalid input.
  • Contract tests — The response shape still matches what clients expect, so a backend change cannot silently break the app or a partner integration.
  • Integration tests — Several calls work together, such as creating, reading, updating and deleting the same record.
  • Negative tests — Bad input, missing fields, wrong types and oversized payloads are rejected with clear errors instead of crashes.
  • Security tests — Protected endpoints reject missing or expired tokens, and users cannot read or change other users' data by changing an ID.
  • Performance tests — Response times and error rates hold up at expected and peak load.

A practical API test checklist

  • Correct status codes for success, client errors and server errors
  • Response bodies match the schema, including types and required fields
  • Authentication required on every protected route
  • Authorization checked: user A cannot reach user B's records by changing an ID in the URL
  • Validation on every input, including empty, null, very long and wrong-type values
  • Pagination, sorting and filtering return consistent results
  • Retrying the same payment or order request does not create a duplicate
  • Rate limits return a clear error instead of failing silently
  • Timeouts and failures from third-party services are handled and logged
  • Passwords, tokens and other secrets never appear in responses or logs

Why authorization bugs deserve special attention

Broken object level authorization, where an API returns another user's data when an ID is changed, is first on the OWASP API Security Top 10 (2023). UI tests rarely catch it because the interface never offers the wrong ID. A few targeted API tests per resource, run as two different users, close the gap.

Running API tests in CI

API tests are fast, which makes them a good fit for every pull request. A common setup runs a quick suite covering the most important endpoints on each pull request, and a fuller suite with negative and contract tests nightly.

Keep test data under control: create what each test needs through the API itself, clean up afterwards, and never point automated tests at production data.

Versioning and backwards compatibility

Mobile apps and partner integrations keep calling old versions of your API long after you ship a new one. Before removing or renaming a field, check who still uses it. Keep tests for every version you still support, and test that deprecated endpoints return a clear warning or error instead of failing in strange ways.

Contract testing tools

If you publish an OpenAPI description of your API, validate real responses against it in your tests, so the documentation and the behaviour cannot drift apart. For services that call each other, consumer-driven contract tools such as Pact let each client record what it expects and check that the provider still delivers it before either side is deployed.

Headers and CORS

  • Responses set the right content type and caching headers
  • CORS allows only the origins that should call the API, not every origin
  • Authentication cookies are Secure, HttpOnly and use an appropriate SameSite setting
  • Error responses use a consistent format that clients can rely on

API testing on a small team

You do not need a dedicated API test team to start. Pick the five endpoints your product cannot live without, write happy-path and authorization tests for each, and run them on every pull request. Add negative and contract tests as you go, and add a test for every API bug that reaches production.

  • Week 1: authentication and the core create-read-update-delete endpoints
  • Week 2: payments, permissions and any endpoint partners call
  • Week 3: negative tests, contract checks and CI reporting

Keep each test small and focused on one behaviour, name it after what it checks, and make failures print the request and response. A failing API test should tell a developer what broke without anyone having to rerun it by hand.

Frequently asked questions

Should QA or developers write API tests? — Both. Developers usually write tests alongside the code for the logic they own. QA adds tests from the outside, focused on edge cases, permissions and how endpoints work together in real journeys.

How is API testing different from unit testing? — Unit tests check small pieces of code in isolation. API tests call the running service over HTTP, so they also cover routing, authentication, serialisation, databases and other services.

Do we need contract tests if we have functional API tests? — If other teams, mobile apps or partners consume your API, yes. Contract tests catch changes to field names, types or required fields that functional tests written by the same team may not notice.

Can API tests run against production? — Read-only checks and monitoring can. Tests that create, change or delete data should run in a test environment, with production protected from test traffic.

Testing GraphQL APIs

GraphQL needs a few checks beyond the usual ones. Because one endpoint serves many queries, test authorization on objects and fields, not just on the endpoint. Check that deeply nested or very large queries are limited, so one request cannot overload the server, and that error responses do not leak internal details. Decide whether schema introspection should be on in production, and test that the setting holds.

Testing webhooks and background jobs

  • The receiver verifies the signature and rejects unsigned or tampered requests
  • Duplicate deliveries do not create duplicate records
  • Events that arrive out of order are handled correctly
  • Failures are retried and eventually alert someone
  • A job that times out leaves data in a consistent state

Mocking third-party APIs

Payment, email and shipping providers should not be called for real in every test run. Use the provider's sandbox for a small set of end-to-end checks and a mock server for the rest. Keep the mocks honest by matching them to the provider's documented responses, including errors and timeouts, and update them when the provider changes its API.

Reading API performance numbers

Report percentiles, not averages. The median (P50) shows a typical request; P95 and P99 show what the slowest requests look like. A healthy average can hide a P99 of several seconds, which is exactly what users notice and what client timeouts punish.

The escape rate problem

If your escape rate for API bugs is high, it means your testing is UI-heavy and API-light. That's a structural problem, not a tooling problem. Fix it by adding API tests to every sprint.

Free QA spot-check

Want a QA engineer to look at your product?

Send us your website or web app address. An engineer will test one key journey, such as sign-up, search or checkout, on desktop and mobile, and email you the most important issues we find. Free, and no call needed.

Related service

QA Testing →

Automated suites, manual deep-dives, and CI guardrails that catch regressions before your users do.

Further reading

About the author

Kawsher, Founder, QA Labs →

Kawsher is the founder of Quality Assurance Labs (QA Labs), the QA-first software testing and development company in Bogura, Bangladesh, founded in 2021. Every article and case study on this site is written or reviewed by Kawsher, drawing on the team's QA testing, AI, web, mobile, video and marketing work for SaaS and AI teams worldwide.

Notes from the lab.

Testing, engineering and growth — delivered to your inbox.

Need an API QA audit? Book a scoping call

Let's talk →