What is Schemathesis?
Schemathesis tests a web API from its schema. Give it an OpenAPI document, a GraphQL schema or a gRPC service with reflection, and it generates requests from the declared types and constraints, valid ones and deliberately invalid ones, then checks each response. It flags 500 errors, responses that do not match the schema, invalid input the API accepts, and broken object-level authorisation, where one user can read another's objects. A stateful phase chains calls, such as create then fetch then delete, using links it infers from the schema and IDs it learns from responses.
It runs as a CLI (uvx schemathesis run <schema-url>), as a pytest plugin, or through a GitHub Action, and is configured in schemathesis.toml with no Python needed. Reports come as an offline HTML page with a reproduction command for each failure, plus JUnit, JSON, NDJSON, HAR, VCR and Allure output. Generation is built on Hypothesis, the Python property-based testing library, and it needs Python 3.11 or newer.
Dmitry Dygalo created it in 2019 and has made 5,957 of its commits. The project is MIT-licensed, has about 3,800 stars and drew 5.78 million PyPI downloads in the last month. It ships constantly: about 100 releases since the start of 2026, the latest being v4.34.4 on 27 November 2026.
Is Schemathesis worth it?
Schemathesis goes after the inputs nobody writes tests for: an empty string where an ID was expected, a number one past the documented maximum, a request that only fails after two others. The project's own evidence is strong. A 2022 ICSE paper by Zac Hatfield-Dodds and Dygalo ran eight API fuzzers 30 times each against 16 open-source services; Schemathesis was the only one to find defects in four of them and found 1.4 to 4.5 times more unique defects than the runner-up on the rest. The paper is co-written by its author, so it is not independent evidence.
The trophy case includes AI infrastructure. Schemathesis found three crashes in vLLM's server, such as a 500 error when stop_sequences held more than four items, and a Qdrant endpoint that accepted timeout=0 despite a declared minimum of 1. For an API drafted by a coding agent, a fuzzer that reads the schema and reports, with a reproduction command, where the code and the spec disagree is a check that does not depend on the agent having written good tests. One developer describes handing the run report to Claude to group findings and drop false positives before fixing anything.
Those false positives are the main complaint. The negative_data_rejection check expects malformed input to be refused with a 4xx, and frameworks such as FastAPI often accept it, for instance by ignoring an empty query parameter; a django-modern-rest user filed a similar report against v4.15.1. Missing auth configuration turns every protected endpoint into a 403 finding, and a schema that misstates types produces noise until it is fixed. The baseline feature, which fails CI only on new failures, and per-operation overrides in schemathesis.toml are how teams make it bearable.
The README also warns about the obvious risk: Schemathesis sends real requests that create, change and delete data, so it belongs against a dev or staging environment, never production. With about 100 releases this year, pin the version in CI and read the changelog when you bump it.
Our take: for any team with an OpenAPI or GraphQL schema, Schemathesis is about the cheapest bug-finder available, because one command and a schema are enough to start. Budget an afternoon to configure auth and silence the checks that do not fit your framework.
Where it earns its place
A five-person backend team running a FastAPI service with a generated OpenAPI schema
Catch 500 errors and schema drift on every pull request without writing more tests
Add the schemathesis/action@v3 step pointed at the staging schema, put the bearer token in schemathesis.toml and enable the baseline so only new failures fail the build. Expect a first afternoon of turning off negative_data_rejection for endpoints where FastAPI is deliberately lenient.
A platform team self-hosting an inference server such as vLLM behind an internal gateway
Make sure malformed requests from internal apps get a 4xx instead of crashing the server
Run schemathesis run against the server's OpenAPI document in a test environment. The trophy case shows the kind of result: oversized stop_sequences and unserialisable parameters that returned 500 instead of a validation error. Fixes go upstream; the run itself costs only test-machine time.
A developer who lets a coding agent write most of a new REST API
Check the agent's endpoints against the published spec before a person reviews the code
Run uvx schemathesis run against the local server with --report html and hand the failures, each with a reproduction command, back to the agent or a reviewer. Stateful tests also exercise create-then-fetch sequences that per-endpoint unit tests skip.
Before you commit
- Setup
- uvx schemathesis run <schema-url> runs it without a permanent install if uv is present; uv tool install schemathesis or uv add --dev schemathesis for regular use. Python 3.11+. The README's demo API returns findings in about 30 seconds; gRPC needs the schemathesis[grpc] extra.
- Integrations
- OpenAPI, GraphQL and gRPC with server reflection; pytest plugin; GitHub Action; JUnit, JSON, NDJSON, HAR, VCR and Allure reports; fuzz dictionaries that can mix in real IDs, wordlists or payloads you generate with an LLM; custom checks in Python.
- Data and privacy
- Runs from your machine or CI against the API you point it at, and sends real requests that create, change and delete data there. Reports stay local. MIT licence.
- Cost at scale
- Free. Cost is test runtime and load on the target: thousands of requests per run, which can be capped with rate-limit or set to auto to follow Retry-After on 429 responses.
- Limits
- False positives from negative-data and header checks on lenient frameworks; needs an accurate schema to be useful; pytest plugin does not load fuzz dictionaries; Hypothesis seeds do not always reproduce runs, per an open issue.
What’s good
- Finds crashes and schema violations from the schema alone
- Stateful testing chains operations without manual wiring
- CLI, pytest plugin and GitHub Action; config without Python
- HTML report with a reproduction command for every failure
What’s not
- Negative-data checks raise false positives on lenient frameworks
- Needs auth set up first or protected endpoints flood the report
- Creates and deletes real data; staging only
- Very fast release pace; pin versions in CI
Best for
Backend and QA teams with an OpenAPI, GraphQL or gRPC schema who want an automated check that the API survives odd input and matches its own spec.
Schemathesis alternatives
Where it fits in the AI stack
Schemathesis: common questions
- Is Schemathesis worth it?
- Schemathesis finds the crashes and spec drift your hand-written API tests miss for the cost of one command, though the first runs take some tuning to quiet the false alarms. We rate it 4.4 out of 5.
- How much does Schemathesis cost?
- Free under MIT, including the CLI, pytest plugin and GitHub Action.
- What are the downsides of Schemathesis?
- Negative-data checks raise false positives on lenient frameworks; needs auth set up first or protected endpoints flood the report; creates and deletes real data; staging only; very fast release pace; pin versions in CI.
- Who is Schemathesis best for?
- Backend and QA teams with an OpenAPI, GraphQL or gRPC schema who want an automated check that the API survives odd input and matches its own spec.
- How much does Schemathesis cost for a team or in production?
- Free. Cost is test runtime and load on the target: thousands of requests per run, which can be capped with rate-limit or set to auto to follow Retry-After on 429 responses.
- Is Schemathesis safe for company data?
- Runs from your machine or CI against the API you point it at, and sends real requests that create, change and delete data there. Reports stay local. MIT licence.
- What are the best Schemathesis alternatives?
- The closest alternatives we have reviewed are Keploy and Strix.
Answers checked Nov 30, 2026.