GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - schemathesis/schemathesis: Catch API bugs before your users do

BranchesTags
Open more actions menu

Latest commit

 

History

6,570 Commits
6,570 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
benches
benches
 
 
corpus/data
corpus/data
 
 
docs
docs
 
 
examples/booking
examples/booking
 
 
img
img
 
 
scripts
scripts
 
 
src/schemathesis
src/schemathesis
 
 
test-corpus
test-corpus
 
 
test
test
 
 
tools
tools
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.readthedocs.yaml
.readthedocs.yaml
 
 
.yamllint
.yamllint
 
 
ARCHITECTURE.md
ARCHITECTURE.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CITATION.cff
CITATION.cff
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.trixie
Dockerfile.trixie
 
 
Justfile
Justfile
 
 
LICENSE
LICENSE
 
 
MIGRATION.md
MIGRATION.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
changelog.py
changelog.py
 
 
codecov.yml
codecov.yml
 
 
mkdocs.yml
mkdocs.yml
 
 
mypy.ini
mypy.ini
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 
typos.toml
typos.toml
 
 

Repository files navigation

Build Coverage Version Python versions Discord License

Schemathesis

Catch API bugs before your users do.

Schemathesis tests OpenAPI, GraphQL, and gRPC APIs by generating inputs from your schema, adapting to server responses, and chaining operations into realistic workflows.

Schemathesis automatically finding a server error
Finding bugs that manual testing missed

Schemathesis HTML report with the verdict, run details, timeline and failing operations
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?

  • 💥 500 errors that crash your API on edge case inputs
  • 📋 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.
  • 🔐 Authentication - static headers, Basic, per-security-scheme credentials, or custom refresh logic.
  • 🔗 Stateful testing - operation links inferred from your schema, no manual wiring.
  • 🧠 Adaptive testing - learns constraints, ids, and auth from responses, reusing them mid-run.
  • ✅ Custom checks - assert your own business rules next to the built-in ones.
  • 📖 Fuzz dictionaries - mix real ids, wordlists, or LLM-generated payloads into generated data.
  • 🐌 Rate limiting - cap the request rate, or use auto to follow Retry-After on 429.
  • 📊 Reports - an offline HTML page with every failure and a command to reproduce it, plus JUnit, NDJSON, JSON, VCR, HAR, and Allure.
  • 🎯 Schema coverage - keyword-level coverage report showing which constraints your tests exercised.
  • 🔁 Replay & baseline - re-run past failures and fail CI only on new ones.

Installation & Usage

Command Line:

uv tool install schemathesis
schemathesis run https://your-api.com/openapi.json

Config file (schemathesis.toml, no Python needed):

headers = { Authorization = "Bearer ${API_TOKEN}" }
generation.max-examples = 500
rate-limit = "auto"

Python Tests:

uv add --dev schemathesis
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

CI/CD:

- uses: schemathesis/action@v3
  with:
    schema: "https://your-api.com/openapi.json"

Who uses it

Used by teams at Spotify, WordPress, JetBrains, and Red Hat.

"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:

  • Quick Start - 5 minutes
  • CLI Tutorial - 20 minutes
  • Pytest Tutorial - 15 minutes

⚠️ Upgrading from older versions? Check our Migration Guide for key changes.

Get Help

  • 💬 Discord community
  • 🐛 GitHub issues

Contributing

We welcome contributions! See our contributing guidelines and join discussions in issues or Discord.

Acknowledgements

Schemathesis is built on top of Hypothesis, a powerful property-based testing library for Python.

License

This project is licensed under the terms of the MIT license.

About

Catch API bugs before your users do

schemathesis.readthedocs.io

Topics

apiapi-testingclifuzzinggraphqlgrpchypothesisopenapiproperty-based-testingpytestswaggertesting

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

3.8k stars

Watchers

19 watching

Forks

233 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.