Schemathesis

Latest version: v3.30.4

Safety actively analyzes 641872 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 45

3.18.3

Not secure
:tada: Quality of life improvements to Schemathesis stateful testing! Enjoy

:rocket: Added

- `APIStateMachine.run` method to simplify running stateful tests.

:wrench: Changed

- Improved quality of generated test sequences by updating state machines in Schemathesis to always run a minimum of two steps during testing. 1627

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`.

Example

python
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()

3.18.2

Not secure
:tada: New Schemathesis release is available with improved performance - up to 30% faster data generation for Open API!

**Upgrade now**

:racing_car: Performance

- Modify values in place inside built-in `map` functions as there is no need to copy them
- Update `hypothesis-jsonschema` to `0.22.1`

3.18.1

Not secure
Hello! This update brings improved stateful testing, reducing the number of failed API calls. Additionally, performance optimizations have been made for a smoother experience.

:wrench: Changed

- Stateful testing: Only make stateful requests when stateful data is available from another operation.
This change significantly reduces the number of API calls that likely will fail because of the absence of stateful data. 1669

:racing_car: Performance

- Do not merge component schemas into the currently tested schema if they are not referenced by it. Originally all
schemas were merged to make them visible to `hypothesis-jsonschema`, but they imply significant overhead. 1180
- Use a faster, specialized version of `deepcopy`.

3.18.0

Not secure
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 in `schemathesis.contrib.unique_data`.
- A few decorators & functions that provide a simpler API to extend Schemathesis:
- `schemathesis.auth` for authentication providers
- `schemathesis.check` for checks
- `schemathesis.hook` & `BaseSchema.hook` for hooks
- `schemathesis.serializer` for serializers
- `schemathesis.target` for targets
- `schemathesis.openapi.format` for custom OpenAPI formats
- `schemathesis.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](https://hatch.pypa.io/).
- Relax requirements for `attrs`. 1643
- Avoid occasional empty lines in cassettes.

Deprecated

- `schemathesis.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`.

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`` with ``starlette_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.

3.17.5

Not secure
Added

- Python 3.11 support. 1632

Fixed

- Allow `Werkzeug<=2.2.2`. 1631

3.17.4

Not secure
Fixed

- Appending an extra slash to the `/` path. 1625

Page 9 of 45

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.