🚀 Added
- Testing Open API 3.2
additionalOperationswith custom methods likeCOPYorPURGE. - Open API 3.2 request body examples given as
serializedValue. - Request bodies for
application/jsonl,x-ndjsonandjson-seq, sent as one JSON record per line. - Array bodies for
multipart/mixedand other non-form multipart types sent as ordered parts. - Open API 3.2
itemSchemaformultipart/mixedand other non-form multipart request bodies. - Request bodies for
text/event-stream, sent as one event per item, including Open API 3.2itemSchema. - XML request bodies place children of
nodeType: noneobjects directly in the parent element. - Error feedback learns integer, hex and ObjectId formats from Java and MongoDB parse errors.
--appoption andappconfig key test Python ASGI and WSGI applications without a server.from-operationdictionaries fill from Open API and GraphQL responses, keeping parent and child IDs paired. #5751setupandteardownhooks run once around testing inst run,st fuzzand pytest.@schemathesis.extensionregisters a hook class with its own[extensions.<name>]settings.schemathesis.scoped_extensions()removes hooks, auth providers and other extensions registered inside a block.hooksconfig option accepts a list of modules, loaded in order.generation.allow-whole-floatsconfig option to stop sending integers in JSON bodies as floats (2.0).Case.reapply_auth()refreshes expired auth tokens on cases generated earlier, honoringrefresh_interval.
🏎️ Performance
- Up to 6x faster data generation for patterns with Unicode-wide classes like
[\P{M}\p{M}]. - Up to 13% faster negative coverage phase against fast local APIs.
- Up to 2x faster GraphQL test case generation in negative mode.
🔧 Changed
st fuzzprobes API capabilities and runs sign-up before fuzzing, likest run.- One
setupphase replacesprobing,schema_analysisandauth_bootstrapin NDJSON reports. - Custom
formatvalues in path parameters are sent as is, with%encoded as%25. - Check failures from
call_and_validate()andvalidate_response()areAssertionErrors, soexcept Exceptioncatches them. - Output sanitization masks
CookieandSet-Cookieheaders per cookie name, keeping non-sensitive cookies visible.
🐛 Fixed
Schema loading
- Path parameter names containing
.,:,!or[failing to load. - Unresolvable remote references written as relative paths reported as missing files.
schema.appunset inafter_load_schemahooks forfrom_asgiandfrom_wsgischemas.- Open API 3.2 references to the
$selfURI, or relative to it, failing to resolve.
Reporting
- Reject two CLI report formats targeting the same output file.
- Crash in HAR reports when the base URL contains credentials.
- Mask sensitive parameters in
meta.raw_containersof NDJSON reports and crash files. - Lost or misattributed pytest report entries for stateful tests and calls to other operations.
- Missing Open API 3.2
queryoperations in the WFC report. - WFC report faults for undeclared methods naming operations missing from
endpointIds. - HAR, VCR and WFC reports created or overwritten by runs refused before testing starts.
--reportdropping output paths set in[reports.<format>].- Record schema loading errors in JUnit reports as an errored test case.
HookExecutionErrorin pytest reports when tests validate responses from their own HTTP client.st fuzzcounting a scenario as passed when the time limit cuts its only request.ModuleNotFoundErrorforallure_commonsin pytest reports whenallure-pytestis not installed.- Mask
apiKeysecurity scheme credentials in output whatever their header, query or cookie name. - Mask credentials in
repr(case)followingoutput.sanitization, like the cURL reproduction command. - Mask sensitive query parameters in network error messages, like the cURL reproduction command.
- Keep URL credentials out of network error messages, crash files and
st replayoutput. <BINARY>shown for text responses cut mid-character bymax-recorded-payload-size.
Request serialization
- Serialization error for multipart parts with
image/jpgand other content types without a serializer. multipart/form-dataarray properties with non-string items sent as a single part.- Unwrapped XML arrays naming their items after the array's own
xml.name. - Missing
application/octet-streampartContent-Typefor binary,contentEncodingand untyped multipart fields. - Generated path values with
%XXsent decoded, e.g.a%41asaAor%e0asU+FFFD.
Data generation
- Internal error for dictionaries bound to parameters whose schema references a shared component.
- Schema error for
patternwith escaped}/]or classes like[\P{M}\p{M}], combined withminLength/maxLength. #6137 - False positive
negative_data_rejectionfor unmapped discriminator values underdefaultMapping. - Missing discriminator
mappingvalues written as schema names in generated data. - Truncated discriminator values for whole-file
$refbranches with dotted names, likePet.Cat.json. - Keep constants from hooks files and other local modules out of generated data.
Coverage phase
- Skipping the valid request when an earlier case fails.
- Oversized strings that crash the server cutting off coverage cases of later operations.
TypeErrorin the coverage phase for schemas with non-arrayexamples.- Internal error for
formatbeside apatternwith an oversized quantifier like^a{100000}$. - Missing positive values when
minLengthexceeds what an unanchoredpatternmatches. #6085 - False positive
positive_data_acceptancefor optional parameters whose schema admits no value. #6085 - Valid
oneOfparameter values sent as negative test cases, e.g.0for an integer-or-string id.
Checks and response validation
- False positive
ignored_authfor operations accepting OAuth 2 or OpenID Connect tokens alongside other schemes. - False positive
ignored_authfor credentials passed viaauthorsession.auth. - Report
after_runchecks skipped when--max-failuresor an interrupt stopsst run. - False positive
negative_data_rejectionfor emptymultipart/mixedarray bodies. - False positive
ensure_resource_availabilityfor request bodies not set by a link. #6178 - Internal error in
positive_data_acceptancefor rejected bodies with undeclared properties and a malformed schema. #6118 --checksenablingmax_response_timewith a 10-second limit, or disabling a configured one.- List failures in the same order on every run, in the CLI and
validate_response()errors. - Report header, body and SSE payload schema violations at the same schema path separately.
Inferred links
- Links filling path, query or header parameters with object or array fields, e.g.
productId: {...}. - Links filling
runner_idwith the id of another resource named after it, like a runner group.
gRPC
- Report gRPC
UNAVAILABLEstatuses from slow-to-connect servers as responses, not network errors.
st replay
- Crash files deleted or replayed against the wrong schema after a run against another API.
CLI and configuration
- Command-line options losing to
[[operations]]and[phases]settings in the configuration file. - Runs ending in authentication errors when the
--auth-wfclogin endpoint starts after the API. - Internal error or ignored Ctrl-C when interrupting
st runandst fuzz. st explain ST112suggesting--exclude-checks max_response_time, whichst runrejects.- Baseline of the matching
[[project]]ignored by the run summary,--baseline-updateand--baseline-prune. - Login-based auth dropping still-valid credentials when a re-login fails, and hiding the login error.
- Shrink
st runfailures to a minimal example, so--no-shrinktakes effect. - Stop
schemathesis.tomldiscovery at the root of a git worktree or submodule. UnicodeEncodeErrorin CLI output on non-UTF-8 streams, such as piped output on Windows.
pytest and Python API
- Shrink failing inputs to a minimal example in pytest, Hypothesis and stateful tests.
- Show argument values in failing examples of other Hypothesis tests run alongside Schemathesis.
AttributeErrorinvalidate_response()for unsupported response types.- ASGI applications receiving requests before lifespan startup completes when tested with several workers.
- Replay expired-token requests with fresh credentials from per-test and
as_strategy()auth providers. - Honor
retry_onof per-test andas_strategy()auth providers, retrying401responses by default.