SeleniumLab

Course3 · Professional QA engineering → API & Contract Testing

3 · Professional QA engineering

HTTP API testing fundamentals

20 min · Module 17

Test status codes, headers, payloads, auth, idempotency, and error shapes. Prefer API checks for business rules; keep UI for wiring.

HelpDesk Lab API (login first):

Example / notes

import requests

s = requests.Session()
# After browser login, reuse session cookie — or login via Django session in tests.
r = s.get("http://127.0.0.1:8000/lab/api/health/")
assert r.status_code == 200
assert r.json()["status"] == "ok"

Practice in Lab: /lab/api/

Log in to track progress / take quizzes
Contract and schema testing →
Modules in this track