Schemathesis tests OpenAPI, GraphQL, and gRPC APIs by generating inputs from your schema, adapting to server responses, and chaining operations into realistic workflows.
Finding bugs that manual testing missed
Verdict, timeline and every failure in one offline page: --report html
Try it now
# Test a demo API - finds real bugs in 30 seconds
uvx schemathesis run https://example.schemathesis.io/openapi.json
# Test your own API
uvx schemathesis run https://your-api.com/openapi.json
# Test a gRPC service with server reflection
uvx --from 'schemathesis[grpc]' schemathesis run grpc://localhost:50051
Schemathesis sends real requests that create, change and delete data. Point it at a dev or staging environment, not production.
What problems does it solve?
💥 that crash your API on edge case inputs
500 errors
📋 Schema violations where your API returns different data than documented
🚪 Validation bypasses where invalid data gets accepted
🔗 Integration failures when responses don't match client expectations
🔄 Stateful bugs where operations work individually but fail in realistic workflows
🕵️ Broken object-level authorization where one user can read another user's objects
What can it do?
⚙️ Config file - auth, phases, and per-operation overrides in schemathesis.toml. No Python.
import schemathesis
schema = schemathesis.openapi.from_url("https://your-api.com/openapi.json")
@schema.parametrize()
def test_api(case):
# Tests with random data, edge cases, and invalid inputs
case.call_and_validate()
# Stateful testing: Tests workflows like: create user -> get user -> delete user
APIWorkflow = schema.as_state_machine()
# Creates a test class for pytest/unittest
TestAPI = APIWorkflow.TestCase
"Schemathesis is the best tool for fuzz testing of REST APIs on the market. We at Red Hat use it for examining our applications in functional and integration testing levels." - Dmitry Misharov, RedHat
See it in action
🏆 Trophy case: crashes and schema violations Schemathesis found in vLLM, Qdrant, OpenObserve, Ory Kratos and Formbricks, each with a link to the fix.
🔬 Live Benchmarks: Schemathesis runs for an hour against real-world APIs such as Apache Airflow, Open WebUI and Prefect. For each one:
Code coverage and API schema coverage: operations, parameters, schema keywords (schema coverage measured with TraceCov)
Issues found, by category
How coverage grows over the run, phase by phase
Documentation
📚 Documentation with guides, examples, and API reference. Start here: