Manuals / API Testing / Chapter 4

B · Test Design · intermediate · Week 2–3 · Chapter 4 of 11

Negative tests & edge cases

Happy paths are table stakes. Pro API testers ship negative cases: invalid payloads, missing auth, wrong methods, boundary values.

Path progress
30%

Step 1 of 4

Negative categories

Invalid JSON, missing required fields, wrong types, unauthorized, forbidden, not found, method not allowed.

Negative categoriesDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Negative categoriedrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Do this now

Add 5 negative requests to collection. Assert 4xx status AND error message shape.

Was this step clear?
Chapter learning outcomes
  • Negative case categories
  • Error body assertions
  • Boundary testing

Clear these before you leave

Side quest

Negative matrix

Table in NEGATIVE-TESTS.md: scenario, request, expected status, expected body keys.