--- id: schemathesis version: "4.24.3" license: MIT license_treatment: permissive maintenance: active --- # schemathesis — Adaptive API testing for OpenAPI and GraphQL License: permissive · Maintenance: active · Downloads: 6.7M/mo ## What it is and what it does Schemathesis is a property-based testing framework for OpenAPI and GraphQL APIs. It reads your API schema, generates test cases covering edge cases and invalid inputs, sends them to your API, and validates that responses match the schema and don't crash. It can also chain operations together to test realistic workflows—for example, creating a resource, fetching it, and deleting it in sequence—to catch bugs that only appear when operations interact. The package integrates with pytest and Hypothesis to run tests both from the command line and within Python test suites. It supports multiple reporting formats (Allure, JUnit XML) for CI/CD pipelines and can adapt its test generation based on server responses. With 15 runtime dependencies including click, requests, pyyaml, and rich, it provides a complete testing toolkit without requiring external tools. Use it for: - Catch 500 errors and crashes caused by edge-case inputs before users encounter them in production. - Verify that your API returns data matching your OpenAPI schema and rejects invalid inputs correctly. - Test multi-step workflows like user creation, retrieval, and deletion to find bugs in operation sequencing. - Integrate API testing into CI/CD pipelines using GitHub Actions or other tools via JUnit XML reports. - Fuzz-test GraphQL APIs to find schema violations and unexpected server behavior. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Schemathesis generates test cases from OpenAPI and GraphQL schemas to automatically find API bugs through property-based testing, including edge cases, schema violations, and stateful workflow failures. Yes. Schemathesis is actively maintained, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. It solves a real problem—finding API bugs through automated schema-driven testing—and is used by established companies like Spotify, WordPress, JetBrains, and Red Hat. Install it if you own or test an OpenAPI or GraphQL API and want to catch bugs before users do. ## Install pip install schemathesis uv add schemathesis poetry add schemathesis ## Installing schemathesis Before you install: Low friction: pure Python wheel with 15 runtime dependencies including hypothesis, pytest, and requests. Active maintenance with a release 20 days ago and 3526 GitHub stars. Supports Python 3.10 through 3.14. License in practice: MIT license (permissive): you can use, modify, and distribute schemathesis freely in commercial and private projects with minimal restrictions. Quickstart: pip install schemathesis import schemathesis schema = schemathesis.openapi.from_url("https://your-api.com/openapi.json") @schema.parametrize() def test_api(case): case.call_and_validate() Verify before relying: - Whether the package's stateful testing (as_state_machine) requires additional setup or configuration beyond the basic usage shown. - Performance characteristics when testing large or complex OpenAPI schemas with many endpoints. - Whether hypothesis-graphql and hypothesis-jsonschema are automatically invoked or require explicit configuration for GraphQL/JSON Schema support. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags openapi api testing, graphql schema testing, property-based api fuzzing, automated api validation, hypothesis-based api testing, stateful workflow testing, schema compliance testing, api-testing, property-based-testing, schema-validation [View on SkillFed](https://skillfed.io/packages/schemathesis) · [View on PyPI](https://pypi.org/project/schemathesis/)