pypi schemathesis 4.35.0
Release 4.35.0

one hour ago

🚀 Added

  • case.generation_mode and the generation_mode hook filter for telling positive from negative test cases.
  • classify_call_outcome hook for telling business-rule refusals from validation errors by response body. #5549
  • schemathesis.errors.Failure for annotating check failures in hooks and except blocks.
  • GitLab security report via --report gitlab, --report-gitlab-path or [reports.gitlab].
  • TOML 1.1 syntax in configuration files, e.g. multiline inline tables with trailing commas.
  • ctx.send for custom checks sending extra requests, shown in reports and reproduction steps.
  • Coverage phase probes for server errors on a malformed Accept or Content-Type header.
  • Dictionary bindings for array items of query, header and cookie parameters, e.g. "query.ids[*]".

🔧 Changed

  • negative_data_rejection failures to name the config for type conversion or ignored properties in a Hint: line.
  • --max-time fuzzing to retry operations without a 2xx response using valid requests only.
  • Coverage phase sending values from [parameters] dictionary bindings in valid requests.
  • Fuzzing of an operation ending after 30 responses in a row with nothing new.
  • --max-time fuzzing to spend fewer requests on operations that show nothing new.
  • Warnings for operations that never accepted a valid request, below the usual thresholds.

🐛 Fixed

  • Check failure and internal frames in tracebacks of errors raised by filter_failure hooks.
  • Only the last pattern applied when an --include-*-regex or --exclude-*-regex option is repeated.
  • False positive positive_data_acceptance and negative_data_rejection for non-object multipart/form-data bodies.
  • Path values from earlier requests reused percent-encoded in later request bodies, e.g. 6%F0%96%B8%88.
  • Hooks files loaded by path failing on @dataclass with from __future__ import annotations.
  • Missing test data warning advising to add links that Schemathesis already infers.
  • Invalid positive arrays in the coverage phase for allOf splitting contains from minContains or maxContains.
  • False positive positive_data_acceptance for array parameters whose items contain the style delimiter.
  • Extension hook methods declared with *args rejected as taking the wrong number of arguments.
  • Misleading error for --config-file placed after the command.
  • Tracebacks for config files that are directories or not valid UTF-8.
  • False positive positive_data_acceptance for nullable fields in form bodies, sent as the text null.
  • Schema Error in negative mode for objects requiring 32 or more string properties.
  • False positive allow_header_conformance on OPTIONS answered with 405, as in FastAPI apps.
  • Constants from installed dependencies used as application constants when packages are symlinked from a cache.
  • Stateful phase re-finding its own failures on every --max-time pass.
  • Automatic sign-up losing authentication after a test logs out or deletes the account.
  • Internal error with --max-time after a stateful pass in which no check ran.
  • Stateful phase ending after a fraction of its scenarios when earlier scenarios change server responses.
  • False ignored_auth failures and generated credentials sent alongside -H credentials for alternative security schemes.
  • Fewer coverage phase test cases on PyPy for schemas reusing a definition.
  • False positive positive_data_acceptance for nullable path parameters, sent as the text null.
  • warnings.fail-on kinds missing from warnings.display neither shown nor failing the run.
  • Wrong schema locations in coverage phase reports on PyPy.
  • --seed runs sending different requests once a previous run saved a failure. #2504
  • generation.dictionaries substituting values far more often than their configured probability.
  • Fuzzing ending after a few test cases for DELETE operations on resources the run created.
  • False positive positive_data_acceptance and negative_data_rejection for non-object application/x-www-form-urlencoded bodies.
  • --generation-deterministic with --max-time sending the same fuzzing inputs on every pass.
  • Runtime Error: cannot unpack non-iterable generator object on PyPy hiding data generation errors.
  • before_generate_* hooks receiving internal wrapper objects in negative mode or with generation.dictionaries.
  • Stateful testing that kept sending requests after reporting API stopped responding.
  • Worker threads that kept sending requests on PyPy after a run was interrupted or closed.

🏎️ Performance

  • Up to 30% more stateful scenarios within the same --max-time.
  • Up to 5% faster test runs on schemas with optional object properties.
  • Up to 35x faster gRPC coverage phase for messages with bytes length rules.

Don't miss a new schemathesis release

NewReleases is sending notifications on new releases.