{"schemaVersion":"1.0","record":{"label":"Schemathesis","description":"Schema-driven API generation, fuzzing and stateful testing for OpenAPI and GraphQL.","aliases":[],"kind":"software","website":"https://schemathesis.io/","overview":"Schemathesis is an MIT-licensed API testing tool that generates requests from OpenAPI or GraphQL schemas. It combines examples, schema coverage, fuzzing and linked request sequences to find server errors or mismatches between documented and actual API behavior.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Schema-driven generation","status":"supported","detail":"Generates requests from OpenAPI and GraphQL and supports custom checks.","useCase":"Schema-based API conformance and robustness tests","platforms":["Python environments","CLI","CI pipelines"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/schemathesis/schemathesis/blob/master/README.md","locator":"Schema-driven generation, CLI/Python use and reports","retrievedAt":"2026-10-07T11:14:26Z","kind":"vendor"}]},{"name":"Stateful workflows","status":"limited","detail":"Requires discoverable producer/consumer relationships; default runs may skip this phase.","useCase":"Schema-based API conformance and robustness tests","platforms":["Python environments","CLI","CI pipelines"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://schemathesis.readthedocs.io/en/stable/guides/stateful-testing/","locator":"Dependency discovery, CLI-only Location inference and empty-phase behavior","retrievedAt":"2026-10-07T11:14:10Z","kind":"vendor"}]},{"name":"GraphQL constraint learning","status":"unsupported","detail":"Documented runtime constraint-learning loop currently applies to OpenAPI, not GraphQL.","useCase":"Schema-based API conformance and robustness tests","platforms":["Python environments","CLI","CI pipelines"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://schemathesis.readthedocs.io/en/stable/explanations/adaptive-testing/","locator":"OpenAPI-specific runtime constraint learning","retrievedAt":"2026-10-07T11:14:10Z","kind":"vendor"}]}],"alternatives":[],"slug":"schemathesis","draftAlternatives":[{"targetSlug":"dredd","status":"limited","detail":"Can replace OpenAPI conformance workflows with generated and stateful tests; API Blueprint inputs and Dredd hooks need a different migration path.","useCase":"Schema-based API conformance and robustness tests","platforms":["Python environments","CLI","CI pipelines"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://github.com/schemathesis/schemathesis/blob/master/README.md","locator":"Schema-driven generation, CLI/Python use and reports","retrievedAt":"2026-10-07T11:14:26Z","kind":"vendor"},{"url":"https://github.com/apiaryio/dredd/blob/master/README.md","locator":"API Blueprint, OpenAPI 2 and experimental OpenAPI 3","retrievedAt":"2026-10-07T11:14:19Z","kind":"vendor"},{"url":"https://github.com/apiaryio/dredd/blob/master/docs/how-it-works.rst","locator":"Transactions, hooks, structure checks and empty-body assertions","retrievedAt":"2026-10-07T11:14:49Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/schemathesis/schemathesis/blob/master/README.md","locator":"Schema-driven generation, CLI/Python use and reports","retrievedAt":"2026-10-07T11:14:26Z","kind":"vendor"},{"url":"https://schemathesis.readthedocs.io/en/stable/tutorials/cli/","locator":"Phases and max-examples scope","retrievedAt":"2026-10-07T11:14:10Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/schemathesis/schemathesis/blob/master/LICENSE","locator":"MIT license","retrievedAt":"2026-10-07T11:14:41Z","id":"schemathesis-license","title":"Schemathesis license","kind":"vendor"},{"url":"https://github.com/schemathesis/schemathesis/blob/master/README.md","locator":"Schema-driven generation, CLI/Python use and reports","retrievedAt":"2026-10-07T11:14:26Z","id":"schemathesis-readme","title":"Schemathesis repository","kind":"vendor"},{"url":"https://schemathesis.readthedocs.io/en/stable/tutorials/cli/","locator":"Phases and max-examples scope","retrievedAt":"2026-10-07T11:14:10Z","id":"schemathesis-cli","title":"Schemathesis CLI tutorial","kind":"vendor"},{"url":"https://schemathesis.readthedocs.io/en/stable/guides/stateful-testing/","locator":"Dependency discovery, CLI-only Location inference and empty-phase behavior","retrievedAt":"2026-10-07T11:14:10Z","id":"schemathesis-stateful","title":"Schemathesis stateful testing","kind":"vendor"},{"url":"https://schemathesis.readthedocs.io/en/stable/explanations/adaptive-testing/","locator":"OpenAPI-specific runtime constraint learning","retrievedAt":"2026-10-07T11:14:10Z","id":"schemathesis-adaptive","title":"Schemathesis adaptive testing","kind":"vendor"},{"url":"https://github.com/apiaryio/dredd/blob/master/README.md","locator":"API Blueprint, OpenAPI 2 and experimental OpenAPI 3","retrievedAt":"2026-10-07T11:14:19Z","id":"dredd-readme","title":"Dredd supported formats","kind":"vendor"},{"url":"https://github.com/apiaryio/dredd/blob/master/docs/how-it-works.rst","locator":"Transactions, hooks, structure checks and empty-body assertions","retrievedAt":"2026-10-07T11:14:49Z","id":"dredd-how","title":"Dredd execution and validation","kind":"vendor"},{"url":"https://github.com/apiaryio/dredd","locator":"Archived November 2024 and legacy project scope","retrievedAt":"2026-10-07T11:14:19Z","id":"dredd-archive","title":"Apiary Dredd repository","kind":"vendor"}],"overviewCitations":["schemathesis-readme","schemathesis-cli"],"licenseCitations":["schemathesis-license"],"sections":[{"id":"generation","heading":"Generated tests and integration","paragraphs":[{"id":"generation-detail","content":[{"text":"The tool can run from a command line with configuration files or integrate into Python tests. It generates inputs rather than requiring an individually scripted example for every case, and permits custom checks alongside built-in validation. Reports and reproducible failures help connect this exploration to CI. The outcome still depends on the schema, reachable operations and checks supplied; generated traffic is not a proof of all business requirements."}],"citations":["schemathesis-readme"]}]},{"id":"workflows","heading":"Following resource relationships","paragraphs":[{"id":"workflows-detail","content":[{"text":"Stateful testing uses relationships between operations to pass real response data into later requests. For OpenAPI, these can come from schema analysis, explicit links or observed Location headers; runtime Location inference is specific to CLI runs. GraphQL uses its type graph and producer mutations. When no usable relationships are found, a default run skips the stateful phase, so a completed run does not necessarily mean multi-step workflows were exercised."}],"citations":["schemathesis-stateful"]}]},{"id":"adaptation","heading":"Runtime learning boundaries","paragraphs":[{"id":"adaptation-detail","content":[{"text":"The current documentation describes learning validation constraints from recognized error responses and reusing resource-lifecycle information during OpenAPI tests. It explicitly distinguishes GraphQL, which supports stateful chaining but not that constraint-learning loop. This is a concrete protocol difference: a generic statement that Schemathesis adapts to responses should not be interpreted as feature parity across both schema types."}],"citations":["schemathesis-adaptive"]}]},{"id":"execution","heading":"Controlling and reviewing runs","paragraphs":[{"id":"execution-detail","content":[{"text":"The max-examples setting bounds generated fuzzing cases per operation and stateful scenarios, not the total number of requests contributed by every phase. Examples and coverage add cases of their own. Runs can emit JUnit reports and traffic-oriented formats, and recorded failures can be replayed. Teams should account for real requests and mutable test data when choosing a target environment; no API requests were executed for this article."}],"citations":["schemathesis-cli"]}]},{"id":"fit","heading":"Substitution scope","paragraphs":[{"id":"fit-detail","content":[{"text":"Schemathesis can substitute for "},{"text":"Dredd","targetSlug":"dredd"},{"text":" for OpenAPI-driven checks against an implemented service, with a stronger emphasis on generated inputs and stateful exploration. Dredd's archived implementation uses documented examples and its own hooks. The substitution is limited to overlapping schema-based tasks: API Blueprint files, hook code and validation expectations are not established as directly portable. Reconcile schemas and failure criteria rather than treating the tools as interchangeable command-line wrappers."}],"citations":["schemathesis-readme","schemathesis-stateful","dredd-readme","dredd-how","dredd-archive"]}]}]},"id":"Q545","revision":592,"updatedAt":"2026-10-12T22:17:29Z","sourceUrl":"https://substitutefor.net/entities/Q545?revision=592"}}