← REST API Development learning pathREST API Development · Module 9 of 10
Testing APIs
Make sure your API works with automated tests.
📖 Key ideas
- Test happy paths and error paths.
- Tools: Postman/Insomnia for manual, Supertest/pytest/RestAssured for automated.
- Contract tests check responses match the spec.
- Load tests (k6, JMeter) check performance.
- Run tests in CI on every change.
💡 Real-life example: Testing an API is a mystery shopper visiting every counter and noting each problem.
Integration testTests endpoints with real components
Contract testChecks API matches its spec
Load testMeasures behaviour under many users
k6Load testing tool