Modern QA2026Practical Exercise — tiles
Log inJoin
23 / 65 · 14 API Testing Fundamentals · Response Validation← prev⊞ allnext →☰ Read as one page

3.7Practical Exercise

Write response validation tests for an API with the following endpoints:

  1. GET /products — returns paginated list with items, total, page, per_page
  2. GET /products/:id — returns single product with id, name, price, category
  3. POST /products — creates a product, returns 201 with the new product
  4. Test pagination: no overlap, correct totals, boundary pages
  5. Test response structure: required fields, correct types, no sensitive data
  6. Test sorting: verify sort=price returns items in ascending price order