Learn
Learn API testing, from zero
Free lessons on APIs, API testing and load testing — what each idea is, why it matters, and how to try it yourself in a few minutes.
These lessons take you from "what is an API?" to finding out why an API slows down under load. Each one explains an idea in plain words, shows real examples, and ends with something to try yourself — on a practice API that runs on your own computer, so you can't break anything and need no server of your own.
Nobody is expected to know the words already. When a lesson uses a term for the first time, it explains it; the glossary has them all.
How to follow along
The Try it boxes use APITestCenter, a free app for sending API requests and running load tests. Download it, or run npx apitestcenter ui if you have Node.js. It has a small practice API built in — a pretend shop with products, sign-in and orders. In the app it's written {{practiceApi}}, so {{practiceApi}}/products means "the practice shop's product list".
The ideas aren't tied to one tool: what you learn here works with any API and any testing tool.
The lessons
APIs from zero
- What an API is — programs asking other programs for things
- Requests: addresses and methods — GET, POST and the rest
- Headers, query parameters and bodies — everything a request carries
- Status codes — 200, 404, 500 and what to do about each
- JSON — the language most APIs answer in
- Signing in: authentication — API keys, tokens, OAuth, cookies, certificates
- Kinds of APIs — REST, GraphQL, WebSockets, events, SOAP, gRPC
Testing APIs
- What API testing is — and why "it answered" isn't enough
- Checks: deciding what a correct answer is
- Environments and variables — one test, many servers
- Chaining requests and test data — real flows, many inputs
- Contracts and schemas — does the API still match its documentation?
- Mocks: testing without the real API
- API tests in a pipeline — tests that run on every change
Performance and load testing
- Why test performance — and the kinds of load tests
- Users and requests per second — how load is made
- Reading results: response times, percentiles, errors
- Finding the bottleneck — why APIs slow down, and how to find out
- Goals and regressions — fast enough for whom, and staying that way
- Testing safely and realistically
Business systems
- OData, the API of business systems — SAP, SuccessFactors, Dynamics: $metadata, $filter, paging, v2 and v4
- The Salesforce REST API — OAuth, describe, SOQL and its pages, errors, the daily API allowance
- NetSuite REST web services and SuiteQL — account IDs, TBA and OAuth 2.0, SuiteQL pages, the concurrency limit
- The SAP SuccessFactors OData API — API servers, SAML bearer sign-in, effective dating, upsert answers
Reference
A suggested path
- New to APIs? Read 1 to 5 in order — about an hour, with the Try it boxes.
- You use APIs, and want to test them well? Start at 8, and dip back into 4 and 6 when needed.
- You need to load-test something this week? Read 15, 16 and 17, then 20 before you start.
- You test SAP, SuccessFactors or Dynamics? Read 21, after 2 to 6 if they're new to you.