An intro into API testing in Python
summary
Walks through setting up a blank PyCharm project, pip installing requests and pytest, making HTTP GETs and POSTs to typicode endpoints, asserting status code 200 for GET and 201 for POST, checking Content-Type equals application/json; charset=UTF-8, extracting data with response.json() and asserting name fields for user IDs 1–3 (parameterized to run three cases), demonstrating posting a JSON payload and reading request body, and recommending the jsonschema library for schema validation.
AI-written summary · about
chapters (12)
- 0:00Introduction to API testing
- 2:57Why API testing matters
- 3:42Setting up Python project
- 4:49Installing requests library
- 5:54Exploring API endpoints
- 9:29Writing first automated test
- 11:41Testing response headers
- 13:07Validating response body
- 15:47Sending POST requests
- 18:44Parameterized testing
- 22:48Summary and key takeaways
- 25:06Q&A session








