Schema-based API-testing — Automatically generate test-cases with schemathesis
summary
Automatically generates API test cases from OpenAPI/Swagger schemas using schemathesis + hypothesis and hypothesis-JSONSchema (GraphQL support in progress). Runs hundreds of randomized requests, exercises stateful workflows via stateful links, and caught a reproduced division-by-zero bug in the demo CRUD app. Supports HTTP or WSGI/ASGI import runs, has CLI and pytest hooks, built-in fixups for common spec issues, and targeted strategies to focus searches while keeping property-based randomness.
AI-written summary · about
chapters (11)
- 0:00Introduction to schema-based API testing
- 1:57API schemas overview
- 5:28Problems with API schemas
- 9:23Property-based testing solution
- 11:50Introducing Schemathesis
- 16:07Live demo of Schemathesis
- 21:26Schemathesis feature overview
- 25:43Pytest integration
- 27:32Stateful testing
- 29:20Future of Schemathesis
- 30:25Conclusion and Q&A
