NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #1896 most downloaded on PyPI
Adaptive API testing for OpenAPI, GraphQL, and gRPC
Latest stable
4.33.1
Last release 18 days ago
04 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
507 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
HTTP Archive (HAR) support comes to Schemathesis! :tada:
HTTP Archive (HAR) support comes to Schemathesis! :tada:
--cassette-format=har CLI option. #2299--generation-with-security-parameters=false CLI option to disable generation of security parameters (like tokens) in test cases.Missing overrides from --set-* CLI options in tests for explicit examples
--set-* CLI options in tests for explicit examplesYour coding agent can read these notes before it upgrades. Set up the MCP server →
Internal error when piping stdout to a file in CLI on Windows.
Excessive urllib3 warnings during testing localhost via https.
urllib3 warnings during testing localhost via https.Content-Type when documented content types contain wildcards.--output-truncate=false CLI option to disable schema and response payload truncation in error messages.
--output-truncate=false CLI option to disable schema and response payload truncation in error messages.EXPERIMENTAL: New stateful test runner in CLI. #864
--experimental=stateful-only CLI flag to run only stateful tests if the new test runner is enabled. Note that this feature is experimental and may change in future releases without notice.negative_data_rejection check. It ensures that the API rejects negative data as specified in the schema.use_after_free check. It ensures that the API returns a 404 response after a successful DELETE operation on an object. At the moment, it is only available in state-machine-based stateful testing.APIStateMachine.format_rules method to format transition rules in a human-readable format. POST /user
└── 201
├── GET /users/{ids}
└── DELETE /user/{id}
GET /users/{ids}
└── 200
└── PATCH /user
DELETE /user/{id}
└── 204
└── DELETE /user/{id}
minLength keyword on string path parameters to avoid the rejection of empty values later on.
This improves the performance of data generation.MaxRetryError. #2234pytest hooks. #2181response_schema_conformance failure messages. #2270RuntimeError caused by a race condition when initializing Hypothesis' PRNG in multiple workers.Case if it is mutated after the make_case call. #2208example key in Open API 2.0 schemas. #2277pytest<6.0.### :bug: Fixed - Remove temporary print calls.
print calls.Inlining too much in stateful testing.
INTERNAL: Remove the ability to mutate components used in schema["/path"]["METHOD"] access patterns.
schema["/path"]["METHOD"] access patterns.OperationNotFound raised in schema.get_operation_by_id if the relevant path item is behind a reference.KeyError instead of OperationNotFound when the operation ID is not found in Open API 3.1 without path entries.allow_x00=False in headers and cookies. #2220schema["/path"]["METHOD"] access patterns and reduce memory usage.get_operation_by_id method performance and reduce memory usage.get_operation_by_reference method performance.Internal error on unresolvable Open API links during stateful testing.
example or examples keys.add_link by avoiding unnecessary reference resolving.I am happy to announce Schemathesis 3.28 :tada:
I am happy to announce Schemathesis 3.28 :tada:
It does not include a lot of new features but instead clarifies error messages and makes Schemathesis work with more recursive references than before.
Request.deserialize_body and Response.deserialize_body helper methods to deserialize payloads to bytes from Base 64.multipart/mixed media type.Unsatisfiable error.GenerationConfig.headers.strategy attribute for customizing header generation. #2137
GenerationConfig.headers.strategy attribute for customizing header generation. #2137python -m schemathesis.cli. #2142anyio>=4.0. #2081The new release of Schemathesis introduces important changes for ASGI & WSGI applications. Now, you can use Case.call and Case.call_and_validate to ru
The new release of Schemathesis introduces important changes for ASGI & WSGI applications. Now, you can use Case.call and Case.call_and_validate to run tests directly, replacing the previous separate methods for these application types (call_asgi / call_wsgi)
Case.as_transport_kwargs method to simplify the creation of transport-specific keyword arguments for sending requests.Case.call work with ASGI & WSGI applications.Case.call_wsgi & Case.call_asgi in favor of Case.call.Case.as_requests_kwargs & Case.as_werkzeug_kwargs in favor of Case.as_transport_kwargs.Support for pyrate-limiter>=3.0.
pyrate-limiter>=3.0.\x00 bytes as a result of probes.Store time needed to generate each test case.
InvalidArgument when using from_pytest_fixture with parametrized pytest fixtures and Hypothesis settings. #2115Support for per-media type data generators. #962
application/yaml & text/yml media types in YAMLSerializer.Not respecting allow_x00 and codec configs options while filling gaps in explicit examples.
allow_x00 and codec configs options while filling gaps in explicit examples.multipart/form-data requests when the schema defines the */* content type.binary format.swagger key and the schema version is forced.Incorrect error message when the code inside the hook module raises ImportError. #2074
ImportError. #2074allow_x00 and codec configs options for data generation in some cases. #2072Improve error message when the minimum possible example is too large.
Added __contains__ method to ParameterSet for easier parameter checks in hooks.
__contains__ method to ParameterSet for easier parameter checks in hooks.Run automatic probes to detect the application capabilities before testing. They allow for more accurate data generation, reducing false positive test
trio. #1872AttributeError when using the experimental support for Open API 3.1 with multiple workers.-D all is passed.CLI: Enhanced Open API 3.1.0 support messaging, now suggesting --experimental=openapi-3.1 option for partial compatibility.
--experimental=openapi-3.1 option for partial compatibility.In this release of Schemathesis, there are significant technical advancements to improve its effectiveness in real-world API testing scenarios. The fo
In this release of Schemathesis, there are significant technical advancements to improve its effectiveness in real-world API testing scenarios. The focus has been on:
It has been a while since tests against the Open API directory were first implemented, but now they are updated and run in our CI every day to ensure compatibility with real-world APIs. They include generating tests against every API and sending them to a mock server.
Some schemas in the directory are too large to be executed in the current CI setup, so they are not included in the following statistic, totaling 4067 syntactically valid API schemas.
Excluding API operations with errors, Schemathesis was able to generate and execute test cases against up to 99.88% (*) of all API operations in the Open API directory.
(*) I'd still investigate more into self-contradicting constraints and unresolvable references as Schemathesis may miss support for some Open API / JSON Schema keywords that are relevant to that behavior.
--hypothesis-no-phases CLI option to disable Hypothesis testing phases. #1324__schema key.tag in filters for custom auth.anyOf / oneOf / allOf keywords.text/xml media type in XMLSerializer.text/json media type in JSONSerializer.@schema.given with explicit examples from the spec is not supported. #1217paths key an error for Open API 3.1.application/x-www-form-urlencoded payloads.--contrib-unique-data CLI option and the corresponding schemathesis.contrib.unique_data hook. The concept of this feature
does not fit the core principles of Hypothesis where strategies are configurable on a per-example basis but this feature implies
uniqueness across examples. This leads to cryptic error messages about external state and flaky test runs, therefore it will be removed in
Schemathesis 4.0--show-trace option is provided.. inside path parameters.format: binary.examples keyword.type keyword.$ref.$ref.TypeError on non-string pattern values. This could happen on values in YAML, such that when not quoted, they are parsed
as non-strings.application/xml; charset=utf-8.KeyError during state machine creation.Incorrect base URL handling for GraphQL schemas. #1987
:tada: Another small release that makes Schemathesis' Python API easier to use.
:tada: Another small release that makes Schemathesis' Python API easier to use.
schema.as_strategy() and schema["/path/"].as_strategy(). #1982repr for GraphQL & Open API schemas.schema["Query"][field_name].application/x-www-form-urlencoded. #1306A small follow-up patch release that addresses missing override on lazy-loaded schemas and a few GraphQL-related bugs.
A small follow-up patch release that addresses missing override on lazy-loaded schemas and a few GraphQL-related bugs.
schema.override on schemas created via the from_pytest_fixture loader.query / cookies / headers in GraphQL schemas. #1978Avoid using the deprecated cgi module. #1962
In this update, I've focused on significantly improving configuration flexibility and testing explicit examples from the spec. Key highlights include:
Introducing an easier and more efficient way to override Open API parameters directly in CLI or Python tests:
$ st run --set-query apiKey=secret --set-path user_id=42 ...
and
@schema.parametrize()
@schema.override(path_parameters={"user_id": "42"}, query={"apiKey": "secret"})
def test_api(case):
...
This way, parameter overrides will only be applied to API operations that use the overridden parameters and won't take time during data generation.
A nearly full rewrite of how Schemathesis handles explicit example testing. It fixes a couple of bugs and allows for testing all examples keywords, including ones inside individual properties, or different media types.
pytest integration with the override decorator. #8examples keyword inside individual property schemas. #1730, #1320cgi module. #1962examples and example fields. #1360$ref keyword. #1692Do not auto-detect spec if the --force-schema-version CLI option is present.
--force-schema-version CLI option is present.:tada: This release offers a better example testing and aids Dredd users transitioning to Schemathesis.
:tada: This release offers a better example testing and aids Dredd users transitioning to Schemathesis.
--contrib-openapi-fill-missing-examples to automatically generate random examples for API operations that lack explicit examples. #1728, #1376--request-proxy to set HTTP(s) proxies for network calls. #1723--generation-codec values in CLI.anyio to <4 due to incompatibility with starlette-testclient.examples from shared parameters. #1729, #1513Internal error during network error handling. #1933
I am pleased to announce the latest release of Schemathesis :tada:
I am pleased to announce the latest release of Schemathesis :tada:
Release Highlights:
arm64 builds, and a new bookworm-based image.hypothesis-jsonschema==0.23.arm64 Docker builds. #1740Metadata.Date, Time, DateTime, IP, IPv4, IPv6, Long, BigInt and UUID. #16906.84.3.jsonschema version to 4.18.0.hypothesis_graphql version to 0.11.0.bookworm-based Debian Docker images instead of buster-based.--show-errors-tracebacks CLI option. Use --show-trace instead.--base-url. #1912typing-extensions and importlib-metadata.Support for hypothesis>=6.90.1.
hypothesis>=6.90.1.Basic support for httpx in Case.validate_response.
httpx in Case.validate_response.NOT_SET from schemathesis.utils. #1890🎉 I am excited to announce the latest release of Schemathesis! 🎉
🎉 I am excited to announce the latest release of Schemathesis! 🎉
This version significantly improves the CLI clarity and responsiveness, making API testing simpler!
Here is CLI output looks like now:
<p align="center"> <img src="https://github.com/schemathesis/schemathesis/assets/1236561/2cae736d-32f0-4e24-9054-512ee0091970" alt="Schemathesis Demo"/> </p>
PR comments became better too!
Case.body is wrapped with a custom wrapper - Binary in order to simplify
compatibility with hypothesis-jsonschema.Case.body inside Case.as_requests_kwargs when serializing multipart data.Content-Type header. #1787Incorrect documentation & implementation for enabling experimental features in pytest.
pytest.Improved CLI error messages for missing or invalid arguments.
I am pleased to announce the latest release of Schemathesis, which brings a range of new features, improvements, and bug fixes aimed at enhancing your
I am pleased to announce the latest release of Schemathesis, which brings a range of new features, improvements, and bug fixes aimed at enhancing your API testing experience. 🎉
Here's a quick overview of what's new:
application/xml serialization opens up new testing possibilities for APIs that use this format.filter_query, map_header, etc.For a full list of changes, please see the changelog below. Your feedback is valuable to us, and we look forward to hearing your thoughts on these updates :pray:
--experimental=openapi-3.1 CLI option for experimental support of OpenAPI 3.1. This enables compatible JSON Schema validation for responses, while data generation remains OpenAPI 3.0-compatible. #1820--sanitize-output=false CLI option. For more advanced customization, use schemathesis.sanitizing.configure(). #1794application/xml serialization based on Open API schema definitions. #733filter_query, map_header, etc.) to minimize boilerplate in extensions. #1673body hooks in GraphQL schemas, enabling custom filtering or modification of queries and mutations. #1464SCHEMATHESIS_REPORT_SUGGESTION=0 environment variable. #1802filter_operations hook to conditionally include or exclude specific API operations from being tested.contains method to ParameterSet for easier parameter checks in hooks. #1789Note: Experimental features can change or be removed in any minor version release.
Werkzeug>=3.0. #1819X-Schemathesis-TestCaseId for easier debugging. #1801case as the first argument to AuthContext.set. The previous calling convention is still supported. #1788InsecureRequestWarning in CLI output if the user explicitly provided --request-tls-verify=false. #1780Before:
Failed to load schema from https://127.0.0.1:6423/openapi.json
You can use `--wait-for-schema=NUM` to wait for a maximum of NUM seconds on the API schema availability.
Error: requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=6423): Max retries exceeded with url: /openapi.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:992)')))
Add this option to your command line parameters to see full tracebacks: --show-errors-tracebacks
After:
Schema Loading Error
SSL verification problem
[SSL: WRONG_VERSION_NUMBER] wrong version number
Tip: Bypass SSL verification with `--request-tls-verify=false`.
AuthProvider.get with a single context argument. The support will be removed in Schemathesis 4.0.AuthProvider. #1776None.Content-Type header, which was previously omitted. #1783SerializedHistoryEntry.case.extra_headers.~4% reduction in the emitted events data size.SerializedError.example attribute. It used to be populated for flaky errors before they became regular failures.TestResult.overridden_headers attribute.Unsatisfiable error for multiple security schemes applied to the same API operation and an explicit Authorization header. #1763
Unsatisfiable error for multiple security schemes applied to the same API operation and an explicit Authorization header. #1763Broken --report CLI argument under click>=8.1.4. #1753
--report CLI argument under click>=8.1.4. #1753Do not raise Unsatisfiable when explicit headers are provided for negative tests.
Unsatisfiable when explicit headers are provided for negative tests.Unsatisfiable when no headers can be negated.Improved handling of negative test scenarios by not raising Unsatisfiable when path parameters cannot be negated but other parameters can be negated.
Unsatisfiable when path parameters cannot be negated but other parameters can be negated.HypothesisDeprecationWarning regarding deprecated HealthCheck.all(). #1739
requests<3. #1742Hypothesis version to 6.31.6 to reflect the requirement from hypothesis-jsonschema.HypothesisDeprecationWarning regarding deprecated HealthCheck.all(). #1739You can now provide a tuple of checks to exclude when validating a response.
Passing params / cookies to case.call causing TypeError. #1734
requests<2.29.params / cookies to case.call causing TypeError. #1734attrs.:tada: I am excited to announce the latest release of Schemathesis! :tada:
:tada: I am excited to announce the latest release of Schemathesis! :tada:
You can now use custom authentication mechanisms from the requests library, apply authentication conditionally to specific API operations, and even throttle requests via the CLI. As always, we've also squashed a few bugs to improve the overall stability of Schemathesis! Happy testing! 🙌
requests library.
You can use schemathesis.auth.set_from_requests to set up Schemathesis CLI with any third-party authentication implementation that works with requests. #1700import schemathesis
from requests_ntlm import HttpNtlmAuth
schemathesis.auth.set_from_requests(
HttpNtlmAuth("domain\\username", "password")
)
@schemathesis.auth.apply_to() and @schemathesis.auth.skip_for() decorators.import schemathesis
# Apply auth only for operations that path starts with `/users/` but not the `POST` method
@schemathesis.auth().apply_to(path_regex="^/users/").skip_for(method="POST")
class MyAuth:
...
OperationDefinition including indexing access, the get method, and "in" support.--rate-limit CLI option. #910schema.auth decorator, replacing the previous schema.auth.register and schema.auth.apply methods:import schemathesis
schema = schemathesis.from_uri("https://example.schemathesis.io/openapi.json")
# Schema-level auth
# Before: @schema.auth.register()
@schema.auth()
class MyAuth:
...
# Test-level auth
# Before: @schema.auth.apply(MyAuth)
@schema.auth(MyAuth)
@schema.parametrize()
def test_api(case):
...
case.call and query parameters passed to case.call_wsgi.
The user-provided values are now merged with the data generated by Schemathesis, instead of overriding it completely. #1705Unsatisfiable error when explicit header name passed via CLI clashes with the header parameter name. #1699port keyword argument in schema loaders during API schema loading. #1721This release of Schemathesis simplifies hooks management and adds support for hooks in the Schemathesis GitHub Action!
:tada: Great news!
This release of Schemathesis simplifies hooks management and adds support for hooks in the Schemathesis GitHub Action!
Now you can take advantage of Schemathesis's hooks to customize your testing workflows directly within your GitHub Actions pipeline.
SCHEMATHESIS_HOOKS environment variable. #1702--pre-run CLI option for loading hooks. Use the SCHEMATHESIS_HOOKS environment variable instead.Support any Werkzeug 2.x in order to allow mitigation of CVE-2023-25577. #1695
:tada: Quality of life improvements to Schemathesis stateful testing! Enjoy
:tada: Quality of life improvements to Schemathesis stateful testing! Enjoy
APIStateMachine.run method to simplify running stateful tests.If you use hypothesis.stateful.run_state_machine_as_test to run your stateful tests, please use the run method on your state machine class instead. This change requires upgrading Hypothesis to at least version 6.68.1.
import pytest
import schemathesis
@pytest.fixture
def state_machine():
schema = schemathesis.from_uri("https://example.schemathesis.io/openapi.json")
return schema.as_state_machine()
def test_statefully(state_machine):
state_machine.run()
:tada: New Schemathesis release is available with improved performance - up to 30% faster data generation for Open API!
:tada: New Schemathesis release is available with improved performance - up to 30% faster data generation for Open API!
Upgrade now
map functions as there is no need to copy themhypothesis-jsonschema to 0.22.1map functions as there is
no need to copy them.hypothesis-jsonschema to 0.22.1 for up to 30% faster data
generation in some workflows.Hello! This update brings improved stateful testing, reducing the number of failed API calls. Additionally, performance optimizations have been made f
Hello! This update brings improved stateful testing, reducing the number of failed API calls. Additionally, performance optimizations have been made for a smoother experience.
hypothesis-jsonschema, but they imply significant overhead. #1180deepcopy.Extra information to VCR cassettes.
--contrib-unique-data CLI option that forces Schemathesis to generate unique test cases only.
This feature is also available as a hook in schemathesis.contrib.unique_data.schemathesis.auth for authentication providersschemathesis.check for checksschemathesis.hook & BaseSchema.hook for hooksschemathesis.serializer for serializersschemathesis.target for targetsschemathesis.openapi.format for custom OpenAPI formatsschemathesis.graphql.scalar for GraphQL scalarsschemathesis.contrib.openapi.formats.uuid extension
You could enable it via the --contrib-openapi-formats-uuid CLI option.attrs. #1643schemathesis.register_check in favor of schemathesis.check.schemathesis.register_target in favor of schemathesis.target.schemathesis.register_string_format in favor of schemathesis.openapi.format.schemathesis.graphql.register_scalar in favor of schemathesis.graphql.scalar.schemathesis.auth.register in favor of schemathesis.auth.utf8_bom fixup is used for WSGI apps.get_call_kwargs in stateful testing. #828starlette.testclient.TestClient with starlette_testclient.TestClient to keep compatibility with newer
starlette versions. #1637### Added - Python 3.11 support. #1632 ### Fixed - Allow Werkzeug<=2.2.2. #1631
Werkzeug<=2.2.2. #1631Appending an extra slash to the / path. #1625
/ path. #1625/ path. #1625Missing httpx dependency. #1614
httpx dependency. #1614Insufficient timeout for report uploads.
This release adds support for newer requests versions.
This release adds support for newer requests versions.
From this release, you can simultaneously run positive & negative tests via CLI by passing -D all
From this release, you can simultaneously run positive & negative tests via CLI by passing -D all
Hypothesis versions. #1592-D all.Hypothesis>=6.54.0.BeforeExecution.data_generation_method and AfterExecution.data_generation_method changed to
lists of DataGenerationMethod as the same test may contain data coming from different data generation methods.CLI: Hanging on CTRL-C when --report is enabled.
CTRL-C when --report is enabled.Suggest using --wait-for-schema if API schema is not available.
--wait-for-schema if API schema is not available.A handful of new usability improvements!
A handful of new usability improvements!
--max-failures=N option to exit after first N failures or errors. #1580--wait-for-schema=N option to automatically retry schema loading for N seconds. #1582st replay when the -v option is passed. #1584explode: true.One column per quarter.