Learning API Testing
REST API Tutorial Syllabus
Use this as the main route through the Learning Zone. Each step builds enough vocabulary and practical evidence to make the next step easier:
- Interactive REST API Tutorial - send real requests and see REST concepts in action.
- HTTP basics - learn how requests, responses, headers, bodies, and URLs fit together.
- REST basics - connect resources, representations, statelessness, and CRUD with API design.
- HTTP methods - understand what
GET,POST,PUT,PATCH,DELETE,HEAD, andOPTIONSare expected to mean. - Status codes - read response outcomes as testing evidence, not just pass/fail signals.
- OpenAPI - use API descriptions to find endpoints, schemas, responses, and security expectations.
- How to Test REST APIs - practise a step-by-step approach for exploring, checking, and reporting API behaviour.
- Interactive API Simulation - use the simulator walkthrough to practise request and response handling safely.
- API Challenges - apply the ideas in a guided API challenge app.
Reference
Use these when you want to revisit a specific concept in more detail:
- Web Applications
- HTTP Basics
- HTTP Verbs and Methods
- REST API Basics
- API Testing Concepts and Coverage
- OpenAPI
- Swagger UI
- Summary
Practise with APIs
Move from syllabus reading to hands-on practice with APIs designed for learning:
Review Challenge Solutions
The challenge solutions are longer walkthroughs for specific API testing ideas. Use them after trying a challenge, or when you want to compare your reasoning with a worked example:
Download Some Tools
Experiment with Other APIs
We have an extensive list of Practice Sites, which includes tips on how to use them.
We are in the process of creating longer tutorial guides with exercises for each of the listed sites.
Understand Your REST Client
The Mirror mode is a good way to test out your tooling and see the details of your requests without using a proxy.
Learn About the Mirror Mode Here
Also you want to learn the limits of your tooling and make sure it is accurately reporting your requests and the responses received. We create the API From Hell to help you stress your REST Client.
Using this API we've seen clients make malformed XML in the response look like we received perfect XML and responses that cannot be rendered. You really need to know what your API Client is hiding.
Stress your REST API Client with the API From Hell
Experiment with our API Simulation Mode
The API has a simulation mode, it uses hard coded data in responses, but tries to mimic some conditions.
e.g. it expects you to post a specific JSON payload or XML payload and responds 'as if' you sent it. But... it also checks if you sent valid json, or valid xml, and responds based on your headers e.g. returning XML if you ask for it.
The simulator is stateless and does not track your usage, making it deterministic for multiple users.
The simulator is a good place to get started because it will respond nicely... unless you mess up the request syntax.
Learn About the Simulator Here
Automating and Testing a REST API Book
Alan Richardson wrote a book Automating and Testing a REST API
Buying the book helps support this web site and application.
Challenge Tutorials
The Challenges have full solution tutorials with key learning lessons and experiments to continue learning from.
Read the API Challenge Solutions
Open Source Workshops
All the material from Alan Richardson's REST API Training workshops have been released to Github.