What Is API Testing? Types, Examples & Best Practices

API testing verifies that an API returns the right data, enforces the right rules, and fails the right way on bad input, by sending real requests to endpoints and checking the responses. The main types are functional, integration, contract, performance, and security testing, and most teams combine several of them.
This guide starts at the first request and ends in your pipeline: what a test actually asserts, the nine types worth knowing, one example you can run today, the process teams follow, how manual, scripted and agent-based work compare, best practices, automation, tool choices, and a directory of sixty-five deeper guides.
What is API testing?
API testing sends real HTTP requests directly at your endpoints and checks status codes, response bodies, auth behavior, and side effects, no user interface required. It applies to REST, GraphQL, and SOAP alike, and because it exercises the layer where your business logic and data live, it is faster and more stable than driving the same logic through a browser.
Two things follow from that. Tests run in milliseconds instead of seconds, because nothing renders. And when one fails, the failure names an endpoint and a field, not a button that moved.
The short version of the rest of this page:
What a test checks: status, headers, body, schema, auth, latency, and the side effect the call was supposed to cause.
The types: functional, integration, contract, schema, security, fuzz, performance, load, and GraphQL.
The process: scope, environment, data, auth, happy paths, negative cases, execution, triage, maintenance.
Who does the work: a person by hand, a script in a repository, or an agent that writes and reruns the scripts.
Where it ends up: in CI, on every pull request, with contract checks early and load tests before the release gate.
What an API test checks
A request goes out. A response comes back. Everything worth asserting sits in one of those two, or in the state the call changed. Sending the request is the easy part. Deciding what counts as correct is the work.
The request. The method, the endpoint path, the query parameters, the headers, and the body you send. HTTP methods carry meaning: a GET should not change anything, and a PUT applied twice should leave the same result as applying it once. If you are unsure which verb a route should use, start with the difference between GET and POST.
The status code. The right code for valid and invalid input, not just a blanket 200 on the happy path. A missing field should return 400, not 500. An expired token should return 401, and a valid token without permission should return 403. Those three get confused constantly, and the HTTP status code groups are worth reading once properly.
The headers. Content type, cache directives, rate-limit counters, CORS, and any correlation ID your services pass along. A response that says it is JSON and is not will break clients that trust the header.
The body. The payload matches the expected shape and values, validated against the schema, not just any JSON. Required fields present, types correct, enums inside their allowed set, timestamps in the declared format, nested objects nested the way the spec says.
Authentication and authorization. Who the caller is, and what that caller is allowed to touch. Swap in another user's ID and the response should be 403 or 404, never their record.
Latency. The endpoint answers inside its budget, so a slow regression is caught before users feel it. Pick a number per endpoint and assert it. Without one, a call that drifts from 90 ms to 900 ms passes every functional test you have.
The side effect. A successful POST is followed by a GET that proves the resource actually exists. A 201 is a claim. The follow-up read is the evidence. The same applies to deletes, queue writes, and anything that fires a webhook.
Why API testing matters and what it catches
APIs fail in ways a browser test never sees, because a browser test only exercises the paths the interface exposes. The failure classes below come from real defect reports, not from theory.
Data format mismatches. Ever expect a birthday in YYYY-MM-DD format and get "12th of June, 1990" instead? APIs sometimes return data in the wrong structure or type, making life tough for apps trying to read or process the info.
Concurrency and race conditions. If multiple requests come flying in at once, an API with poor concurrency handling might behave unpredictably: data overlap, lost information, or outright crashes.
Compatibility problems. A new version might play nice with itself but break connections with older clients, causing broken features or unexpected failures.
Contract drift. A field gets renamed, a type changes from string to integer, an optional field becomes required. The provider's own tests pass. Every consumer breaks.
Authorization gaps. An endpoint checks that you are logged in and forgets to check whether the record belongs to you.
Error handling that hides the error. A 200 with an error message in the body, or a 500 where a 422 belonged. Both make automated clients retry work that will never succeed.
Catching those needs more than one endpoint at a time. QA should design scenario-based tests that reflect real user journeys and edge cases across microservices, data stores, and third-party APIs. That means chaining calls, validating state changes, and probing failure modes like timeouts, retries, circuit breakers, and rate limits.
For worked examples of each failure class and how teams fix them, see common API testing defects and the API failures that break production most often.
API testing types
Nine types cover almost everything teams run. They are not alternatives to each other. A working suite uses several, and each answers a different question.
| Type | What it checks | Go deeper |
|---|---|---|
| Functional | A request produces the expected status, body, data shape, error behavior, and business result for normal and edge cases. | API testing checklist |
| Integration | Services, databases, queues, and external APIs exchange data and handle dependency errors correctly across their boundaries. | API integration testing |
| Contract | A provider still accepts the request shape and returns the fields, types, status codes, and error shape its consumers expect. | Contract testing |
| Schema | Required fields, data types, formats, nullability, and nesting match the declared JSON, OpenAPI, or GraphQL schema. | Understanding JSON Schema |
| Security | Authentication, authorization, sensitive-data exposure, input handling, encryption, and rate limits resist unauthorized or hostile requests. | Common API attacks |
| Fuzz | Malformed, unexpected, random, and hostile inputs do not cause crashes, data leaks, unsafe writes, or unhandled errors. | API fuzz testing |
| Performance | Latency, throughput, resource use, and stability stay within budgets as traffic and conditions change. | API load testing guide |
| Load | Response time and error rate stay acceptable at expected and peak concurrent volumes, and the API recovers after spikes. | API load testing guide |
| GraphQL | Queries return requested fields, mutations persist intended changes, subscriptions behave, responses match the schema, and body-level errors and authorization are handled. | GraphQL API testing |
Contract testing is the one teams skip and then regret. Contract testing ensures that an API behaves exactly as agreed upon between developers and consumers. Think of the API contract as a detailed blueprint that specifies what data gets sent and received, right down to the required fields, data types, and expected responses for every endpoint. Functional tests tell you the provider works. Contract tests tell you it still works for the people calling it.
GraphQL earns its own row because the failure signature is different. A GraphQL endpoint answers 200 and puts the failure in an errors array in the body, so a suite that only checks status codes reports a broken query as a pass.
One runnable API test
Here is a complete test in four parts: the request, the fields you expect back, the assertions, and what a failure looks like. It uses api.example.com as a placeholder host, so swap in your own and it runs. Nothing here is tool-specific.
1. The request. Ask for one user, with an auth token, and print the status and total time alongside the body.
curl --request GET \
--url https://api.example.com/v1/users/usr_123 \
--header 'Accept: application/json' \
--header "Authorization: Bearer $API_TOKEN" \
--silent --show-error \
--write-out '\nHTTP_STATUS:%{http_code}\nTIME_TOTAL:%{time_total}\n'
2. The response you expect. Four fields, each with a rule attached.
{
"id": "usr_123",
"email": "ada@example.com",
"status": "active",
"created_at": "2026-08-01T10:15:30Z"
}
id: required string, equal to the requested user ID.email: required string.status: required enum such asactiveordisabled.created_at: required ISO 8601 timestamp string.
3. The assertions. Three checks, one per failure class you care about.
Status: HTTP status equals
200.Schema field:
body.idexists and is a string.Latency: total response time is below
500 ms.
4. What a failure looks like. This is the output that makes the test worth writing. The status passed. Two other things did not.
FAIL GET /v1/users/usr_123
PASS status: expected 200, got 200
FAIL schema body.id: expected string, got null
FAIL latency: expected < 500 ms, got 842 ms
Result: 1 passed, 2 failed
A suite that only asserted the status code would have called this run green. The endpoint returned 200 while handing back a null ID and taking almost a second to do it. The gap between "returned 200" and "did the right thing" is the whole argument for asserting on the body and on the clock.
Rather than write these by hand for every endpoint, start from ready-made API test templates and adapt them.
The API testing process
The journey of API testing is best approached in stages. Begin with fundamental tests that verify basic functionality, core features, and common use cases. Once these foundations are solid, advance to more sophisticated testing scenarios. This includes examining edge cases that might break your API, conducting thorough load tests to ensure performance under pressure, and implementing security checks to protect your data.
In practice that breaks into nine steps.
Scope. List the endpoints and rank them by what breaks if they fail. Payments and auth first. An admin report nobody reads can wait.
Environment. Pick where tests run and keep it stable. Ephemeral environments, one per pull request or per branch, stop two runs from fighting over the same record.
Test data. Decide what each test creates, reads and cleans up. A test that depends on a row somebody else created will fail on a Tuesday for no reason.
Auth. Get a token the way a real client does, and store at least two identities so you can check that user A cannot read user B's data.
Happy paths. Every endpoint, valid input, expected status and body. This is the baseline that tells you the wiring works.
Negative tests. Missing fields, wrong types, oversized payloads, expired tokens, no token, another user's token, and values just outside the allowed range.
Execution. Run the suite on a trigger, not a reminder: on every pull request, on a schedule, or from a webhook when a service deploys.
Triage. Sort each failure into a real bug, a stale test, or an environment problem. A suite nobody triages becomes a suite nobody reads.
Maintenance. Update tests when the contract changes, on purpose, in the same pull request that changed it.
Ownership splits along the same line. Developers should deliver a CI-green baseline that includes unit tests for controllers and services, schema validation against an OpenAPI or Swagger spec, happy-path and negative responses with correct HTTP status codes, and consumer-driven contract tests for backward compatibility. Mocking dependencies or using service virtualization keeps tests fast and deterministic. Include idempotency checks, pagination limits, and error payload consistency.
API testing checklist
The short form, for a new service or a review of an old one. Each line is one question you should be able to answer yes to.
Every endpoint has at least one test for a valid request.
Every endpoint has at least one test for an invalid request, asserting the status code and the error body.
Response bodies are validated against a schema, not against a handful of hand-picked fields.
Auth is tested three ways: no token, expired token, and a valid token belonging to somebody else.
Writes are followed by a read that proves the write landed.
Each endpoint has a latency budget and a test that asserts it.
Rate limits and pagination are covered, including the last page and the page past the end.
Tests create their own data and clean it up.
The suite runs in CI, not on a laptop.
Failures name the request, the response, and which assertion failed.
The long form, with test cases for each item, is in the 12-step API testing checklist.
Manual, scripted and agent-based API testing
The three approaches differ less in what they can test and more in who does the work and what happens when the API changes.
Manual and no-code. No-code API testing relies on visual tools and automation to design and run tests without needing programming skills. This approach helps teams simplify workflows and allows members from different roles to participate in the testing process. It is fast to start, and it is how most people explore an unfamiliar API. The cost shows up later, when somebody has to click through the same checks again after every change.
Scripted. Code-based API testing involves writing test scripts in programming languages like Python, Java, or JavaScript. These scripts simulate API interactions and validate responses directly through code. Scripts live in the repository, run in CI, and handle any logic you can express. They also need somebody who knows that language to keep writing them, and somebody to fix them when a field is renamed.
Agent-based. An AI agent reads your spec or collection, writes the scenarios, runs them against a real target, and rewrites them when the API changes. The work moves from authoring to reviewing. What you check is whether the generated assertions are the ones you would have written.
| Manual and no-code | Scripted | Agent-based | |
|---|---|---|---|
| Who does the work | Anyone on the team | Somebody who writes code | The agent, with a human reviewer |
| Time to first test | Minutes | Hours to days | Minutes |
| Cost when the API changes | Repeat the clicks | Edit the scripts | Review the rewrite |
| Custom logic | Limited to what the tool exposes | Anything you can code | Anything the generated code can express |
| Runs in CI | Sometimes | Yes | Yes |
| Best fit | Exploring, one-off checks, demos | Complex flows, teams with capacity | Broad coverage nobody has time to write |
Deciding between no-code and code-based API testing comes down to factors like your team's technical skills, the complexity of your project, and available resources. Weigh six things: the skills already on the team, how fast tests get created and maintained, project complexity, what has to integrate with what, cost, and how much customization you actually need.
Most teams end up mixing them. Use no-code tools for routine API checks, and reserve code-based testing for more complex tasks. That is a division of labour, not a compromise.
API testing best practices
Five practices carry most of the value.
Automate repetitive test cases for faster feedback. Anything you have run by hand twice is a candidate.
Version-control your API contracts to track breaking changes. The spec belongs in the repository next to the code, and a diff on it should be reviewable.
Test under realistic network conditions to mimic user experience. A test on localhost tells you nothing about a mobile client on a slow connection.
Include negative testing. Invalid inputs, missing headers, wrong types, and the values a hostile caller would try.
Integrate testing into CI/CD pipelines for continuous coverage. A suite that runs on request is a suite that runs rarely.
Then there is the practice that decides whether anyone trusts the results. Flaky API tests usually trace back to bad data. Use synthetic datasets for edge cases, masked production subsets for realism, and ephemeral environments (per pull request or per branch) to isolate state. Virtualize third-party services with something like WireMock or Hoverfly so tests are deterministic and run in parallel.
Three more that pay for themselves:
Pick tests by risk, not by coverage percentage. Full coverage of a settings endpoint is worth less than three good tests on checkout.
Assert on behavior, not just status. Status codes are the cheapest assertion and the weakest one.
Keep failures readable. A failure should show the request that was sent and the response that came back. Anything less turns triage into guesswork.
API test automation and CI/CD
Automation is not one decision. It is a decision per test, and then a decision about where in the pipeline that test runs. Not everything belongs on every commit: a full load test on every push burns an hour and tells you nothing new.
Three stages, three jobs:
Pre-merge, at commit stage: run fast, lightweight smoke and contract tests to validate the basic API contract and fail early.
Post-merge, at build stage: trigger full regression and security scans, including an OWASP suite and fuzzing, in parallel.
Staging, at the pre-production gate: run performance and load tests with realistic traffic or replayed production traces, plus zero-trust and authorization tests, before accepting deployment to production.
What to automate first: the tests you rerun most, and the ones that catch the failures that hurt. Contract tests are the highest-value early job, because they are fast and they catch the change that breaks other teams.
Go deeper on API automation testing for the method, continuous API testing in CI/CD pipelines for the pipeline wiring, and the REST Assured tutorial if your stack is Java.
API testing tools and migration choices
Pick by the job, not by the category. Four questions settle most tool decisions.
Who writes the tests? If the answer is that nobody has time, a nicer request window will not help.
Where do tests live? Files in Git can be reviewed in a pull request. A cloud workspace cannot.
Does it run headless in CI? Check that the command-line runner exists and is not gated behind a paid tier.
What does an import actually carry? Requests usually migrate. Scripts and environment logic usually do not.
The categories, in plain terms. Request clients are windows to send requests from, with collections and light assertions. Code-first frameworks are libraries you write tests in, inside your own repository. Contract tools verify a provider against its consumers. Load tools generate traffic and measure it. Agent-based platforms write and maintain the tests for you. Most teams end up with one tool from two or three of those groups.
For the full comparison, see the 13 best API testing tools. If you are moving off a specific tool, the migration guides cover what carries over: Postman alternatives, Insomnia alternatives, SoapUI alternatives, and Swagger alternatives.
The API testing topic directory
Every guide on this site that belongs to API testing, in eight groups. Start anywhere.
Fundamentals
API Integration Testing: Strategies, Tools and Best Practices. How to test service, database, and third-party API interactions.
API Testing Checklist: 12 Essential Steps. A 12-step checklist for functional, security, and performance coverage.
Common API Testing Defects: Contract, Auth and CI/CD Fixes. Schema drift, authorization leaks, pagination, idempotency, and pipeline defects.
Contract Testing: What It Is, Tools and How to Start. Provider and consumer contracts, tools, and where contract tests fit.
Convert XSD to JSON Schema: Complete Guide with Examples. Maps XML Schema types and structures to JSON Schema.
CSV vs JSON: Differences, Use Cases and Performance. Compares structure, nesting, performance, and use cases.
GET vs POST: Key Differences and Examples. Request bodies, caching, safety, and common uses for each verb.
History of APIs: From the 1960s to REST and Beyond. Traces API development from early computing through REST and modern platforms.
HTTP Methods Explained: GET, POST, PUT, DELETE. Defines the main HTTP methods and when REST APIs use each one.
Different Status Codes of an API (HTTP status codes). Explains the 1xx through 5xx status-code groups.
API Test Examples: Ready-Made Templates for QA. Reusable functional, security, and performance test cases.
Understanding JSON Schema: A Guide for Qodex.ai Users. JSON Schema fields and their use in validation and documentation.
What Are API Collections and How to Create One. How collections organize requests and shared test setup.
API Endpoint Explained: What It Is, Examples and Security. Defines endpoints with REST and GraphQL examples, URL structure, and auth.
What Is JSON? Introduces JSON as a data-exchange format.
What Is a Payload in an API? Definition and Examples. Request and response payloads, formats, and size limits.
XML vs JSON: Differences, Performance and When to Use Each. Compares syntax, performance, and fit for different data exchanges.
YAML vs JSON: Syntax, Comments and When to Use Each. Compares syntax, readability, comments, and common uses.
API Documentation Best Practices: Examples and Writing Guide. Documentation structure, writing practices, examples, and tools.
HTTP status references
HTTP 429 Too Many Requests: Meaning, Causes, and Fixes. Retry-After, RateLimit headers, backoff, and a deterministic rate-limit test.
HTTP 401 vs 403: What Is the Difference?. Identity versus permission, WWW-Authenticate, and a four-identity test.
HTTP 422 Unprocessable Content: Meaning, Causes, and Fixes. Validation errors as problem+json, 400 versus 415 versus 422, and a field-pointer test.
HTTP 500 Internal Server Error: Causes, Fixes, and Tests. Safe error bodies, request IDs, retry rules, and fault-injected tests.
HTTP 503 Service Unavailable: Meaning, Causes, and Fixes. Retry-After, load shedding, 502 versus 503 versus 504, and a maintenance-flag test.
Protocols and API styles
GraphQL API Testing: How to Test Queries and Mutations. Queries, mutations, subscriptions, schema, auth, and body-level errors.
GraphQL vs REST API: Differences, Performance and When to Use. Compares API shape, caching, flexibility, performance, and use cases.
gRPC vs REST: Key Differences and When to Use Which. Compares transport, streaming, browser support, speed, and fit.
10 Advanced REST API Interview Questions for Developers. REST services, HTTP methods, status codes, and design questions.
REST API Testing: Methods, Tools and Best Practices. A full REST testing guide covering methods, auth, errors, automation, and tools.
SOAP vs REST API: Differences, Use Cases and When to Choose. Compares protocols, data formats, security, performance, and use cases.
Automation and CI
Continuous API Testing in CI/CD Pipelines: How to Set It Up. What to run at each pipeline stage and how to gate releases.
API Testing with AI in 10 Minutes. Creating API tests from a collection or specification with AI assistance.
pytest vs unittest: Which Python Test Framework Should You Use?. The same test in both frameworks, lifecycle and data-case differences, plugins, mixed-suite execution, and a staged migration path.
REST Assured Tutorial: API Test Automation in Java. Java setup, auth, response checks, JSON or XML parsing, and practices.
7 API Testing Challenges Solved with AI. Test data, coverage, flaky scripts, security, and pipeline integration.
API Automation Testing: How It Works, Tools and Practices. Defines API automation, its process, tool choices, and maintenance practices.
Security
API Attacks: Real-World Examples, OWASP Risks and Prevention. Catalogs common attack classes, examples, and defenses.
API Compliance Testing: GDPR, HIPAA and PCI-DSS Guide. API checks for three common privacy and payment regimes.
API Fuzzing: How to Fuzz Test Your APIs. How malformed input exposes crashes, unsafe behavior, and security bugs.
API Inventory: 10 Steps to Build and Maintain One. How to find, classify, and maintain an API inventory.
Performance and load
API Load Testing Guide: Tools, Strategies and Best Practices. Traffic models, limits, load tools, and performance checks.
API Uptime Monitoring Guide: Endpoints, Checks and Alerts. Endpoint health checks, authentication, alerts, and incident response.
JMeter API Testing: From a First REST Test Plan to a CI Run. A REST test plan with JSON checks, the non-GUI run, the HTML report, and a CI job that fails on failed samples.
Top 5 Metrics for API Throughput Testing. Defines the main throughput and capacity measurements.
What Is API Latency? Defines API latency and how response delay affects tests and users.
What Is Soak Testing: A Detailed Guide. Long-duration testing for leaks and resource degradation.
Tools and alternatives
13 Best API Testing Tools (Free and Paid). Thirteen tools run on one fixture API, grouped by job, with the CI command for each.
cURL vs Swagger vs Postman: Key Differences Compared. Request execution, documentation, testing, automation, and collaboration.
8 Best Insomnia Alternatives for API Testing. Clients and test platforms for teams moving away from Insomnia.
Insomnia vs Postman: Features and Pricing. Compares pricing, plugins, GraphQL support, and team features.
7 Best Karate Labs Alternatives for API Testing. Code-first, client-based, and agent-based alternatives to Karate.
Keploy Alternatives: 7 API Testing Tools. Record-replay, test-generation, platform, and pricing choices.
10 Best Postman Alternatives for API Testing. Ten API clients and test platforms, with migration notes.
Postman Explained: A Beginner's Guide. Sending requests, reading responses, collections, and troubleshooting.
Qodex.ai vs ReadyAPI: Which Is Better? Compares the two on features, scale, documentation, and developer workflow.
ReadyAPI vs Postman: A Simple Analysis. A short comparison of the two API testing tools.
9 Best SoapUI Alternatives for API Testing. SOAP and REST testing replacements for SoapUI.
9 Best Swagger Alternatives for API Documentation. Documentation and API-reference alternatives to Swagger UI.
Top Backend Testing Tools for Efficient QA. Tools for backend automation, performance analysis, and debugging.
Top 10 cURL Commands: A Guide for Developers. Practical cURL commands for requests, downloads, and API testing.
Use cases
API Testing for Banking Applications: Complete Guide. Banking API security, payment compliance, test strategy, and financial flows.
How to Convert JSON to CSV: Tools, Python and JavaScript. Browser, Python, JavaScript, and command-line conversion methods.
Rugcheck API Guide: Get Your Key and Start Building. API-key setup and token-audit requests for Rugcheck.
API Sandbox: What It Is and Best Practices. Isolated API environments, setup, test data, and safety practices.
Salesforce API Testing: REST, SOAP, Bulk, Pub/Sub and GraphQL. OAuth JWT bearer setup, sandboxes and scratch orgs, edition request limits, a runnable REST assertion, and the failures to test.
How Qodex applies the process
The process above is the same one Qodex automates. Point it at an OpenAPI or Swagger spec, or a Postman collection, and it imports the surface and infers the auth scheme. It generates scenarios for the happy paths, the negative cases, and OWASP-aligned security checks, and it verifies each one against your real target before saving it. Runs happen on the pull request, so a broken contract shows up in review rather than in staging. A failure arrives with the request that was sent and the response that came back, so triage starts with evidence. Saved scenarios replay deterministically, with no model in the loop, so rerunning the suite costs the same on its hundredth run as on its first.
See how Qodex API testing works.
Frequently Asked Questions
What is API testing in simple terms?
It is checking that an API does what it promised, by sending it real requests and reading the responses. You assert on the status code, the body, the headers, the timing, and the change the request was supposed to make. There is no browser and no user interface involved.
When should API testing start?
As soon as there is a specification, which is usually before the endpoint is finished. Contract and schema tests can be written against the spec alone. Functional tests follow the first working endpoint. Load and soak tests come later, once the behavior is stable enough that a performance number means something.
Who owns API testing, QA or developers?
Ownership is shared, but accountability shifts by layer. Developers own unit and contract tests that validate business logic, error handling, and API schema early in the software development life cycle, the sequence of steps a team follows from requirements to release. QA owns integration, end-to-end, and non-functional testing to ensure reliability across services and environments.
How much of API testing should be automated?
Automate anything you would otherwise repeat: every happy path, every negative case, every contract check. Keep manual work for exploring a new endpoint and for one-off investigations. The test to apply is simple. If you have run it by hand twice, it belongs in the suite.
Is API security testing different from API testing?
It is a type of API testing with an inverted expectation. A functional test passes when the request succeeds. A security test passes when a hostile request is blocked. The mechanics are the same requests and assertions, so both belong in one suite. See common API attacks for the classes worth covering.
How is testing a GraphQL API different from testing REST?
The transport is the same and the failure signalling is not. GraphQL usually answers 200 even when the query failed, and puts the problem in an errors array in the response body. So assert on the body, on the presence of that errors array, and on field-level authorization. GraphQL API testing covers queries, mutations, and subscriptions in detail.
How do I choose an API testing tool?
Answer four questions first: who writes the tests, where the tests are stored, whether it runs headless in CI, and what an import actually carries over. Then pick from the category that matches. The API testing tools comparison covers request clients, code-first frameworks, load tools, and agent-based platforms side by side.
What belongs on an API testing checklist?
Valid and invalid requests for every endpoint, schema validation on responses, three auth cases (no token, expired token, another user's token), a read that proves each write landed, a latency budget per endpoint, rate limits and pagination, self-cleaning test data, and readable failures. The 12-step checklist expands each of those into test cases.
How is API testing different from unit testing?
A unit test calls a function inside your process, with the dependencies replaced. An API test calls the running service over HTTP, with the routing, serialization, auth middleware, and database in the path. Unit tests catch logic errors sooner. API tests catch the wiring problems that only appear once the pieces are assembled.





