More than 200 OK: How to Do Negative Testing on APIs
summary
Covers concrete negative API tests using Postman against the demo API at thinkingtester contact list for rokuapp.com. Shows happy paths (POST /contacts → 201, GET → 200) then three negative categories: response codes, security, and input validation. Demonstrations include missing auth header (401), invalid token "Foo" (401), cross-user access returning 404 by design, missing required firstName (400 + error), lastName 21 chars when max 20 (400 + error), and invalid birthdate Feb 29 2021 (400). Wraps up with assertions to check exact status and error messages.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 0:21Why test APIs
- 3:35Negative test types
- 5:40API security tests
- 9:11Input validation tests
- 12:45Conclusion and resources
related talks
22mAPI Security Testing with Postman: Best Practices and Techniques
42mAPI Exploratory Testing
49mTesting Your APIs: Postman, Newman & Beyond
27mEffectively Testing Services
19mReady to Bet on Your API Health?
19mFunctional Testing of GraphQL APIs: Simple Checks That Catch Real Bugs
26mTips and tricks for writing API Tests
13m7 Must-Know Techniques for Effective REST API Testing
