Added
- Extra information to VCR cassettes.
- The
--contrib-unique-data
CLI option that forces Schemathesis to generate unique test cases only.
This feature is also available as a hook inschemathesis.contrib.unique_data
. - A few decorators & functions that provide a simpler API to extend Schemathesis:
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 scalars
- Open API: UUID format generation via the
schemathesis.contrib.openapi.formats.uuid
extension
You could enable it via the--contrib-openapi-formats-uuid
CLI option.
Changed
- Build: Switch the build backend to Hatch.
- Relax requirements for
attrs
. #1643 - Avoid occasional empty lines in cassettes.
Deprecated
schemathesis.register_check
in favor ofschemathesis.check
.schemathesis.register_target
in favor ofschemathesis.target
.schemathesis.register_string_format
in favor ofschemathesis.openapi.format
.schemathesis.graphql.register_scalar
in favor ofschemathesis.graphql.scalar
.schemathesis.auth.register
in favor ofschemathesis.auth
.
Fixed
- Remove recursive references from the last reference resolution level.
It works on the best-effort basis and does not cover all possible cases. #947 - Invalid cassettes when headers contain characters with a special meaning in YAML.
- Properly display flaky deadline errors.
- Internal error when the
utf8_bom
fixup is used for WSGI apps. - Printing headers that are set explicitly via
get_call_kwargs
in stateful testing. #828 - Display all explicitly defined headers in the generated cURL command.
- Replace
starlette.testclient.TestClient
withstarlette_testclient.TestClient
to keep compatibility with newer
starlette
versions. #1637
Performance
- Running negative tests filters out less data.
- Schema loading: Try a faster loader first if an HTTP response or a file is expected to be JSON.