Schemathesis

Latest version: v3.30.1

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

Scan your dependencies

Page 1 of 44

3.30.1

:version:`3.30.1 <v3.30.0...v3.30.1>` - 2024-06-24
--------------------------------------------------

**Added**

- ``--output-truncate=false`` CLI option to disable schema and response payload truncation in error messages.

**Changed**

- More fine-grained events for stateful testing.

**Fixed**

- Internal error caused by an upstream race condition bug in Hypothesis. :issue:`2269`
- Do not output stateful tests sub-section in CLI if there are no stateful tests due to applied filters.

3.30.0

:version:`3.30.0 <v3.29.2...v3.30.0>` - 2024-06-23
--------------------------------------------------

**Added**

- **EXPERIMENTAL**: New stateful test runner in CLI. :issue:`864`
- The ``--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.
- Ability to extract values from headers, path, and query parameters using regular expressions in OpenAPI links.
- The ``negative_data_rejection`` check. It ensures that the API rejects negative data as specified in the schema.
- The ``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.
- Support for building dynamic payloads via OpenAPI links. This allows for building objects or arrays where nested items are not hardcoded but dynamically evaluated.
- ``APIStateMachine.format_rules`` method to format transition rules in a human-readable format.

.. code-block::

POST /user
└── 201
├── GET /users/{ids}
└── DELETE /user/{id}

GET /users/{ids}
└── 200
└── PATCH /user

DELETE /user/{id}
└── 204
└── DELETE /user/{id}

**Changed**

- Enforce the ``minLength`` keyword on string path parameters to avoid the rejection of empty values later on.
This improves the performance of data generation.
- Rework building state machines for stateful testing to improve performance.
- Improve error messages on ``MaxRetryError``. :issue:`2234`
- Migrate to new-style ``pytest`` hooks. :issue:`2181`
- Filter out Hypothesis' warning about resetting the recursion limit in multi-worker tests.
- Show sub-schema location in ``response_schema_conformance`` failure messages. :issue:`2270`
- Avoid collecting data for stateful tests in CLI when they are explicitly disabled.

**Fixed**

- Internal error during OpenAPI link resolution if the needed parameter is missing in the response.
- Improper output when a JSON pointer can't be resolved during OpenAPI link resolution.
- Generating invalid examples created by wrapping a named example value into another object. :issue:`2238`
- Distinguish more failures in stateful testing.
- Generate different functions for state machine transitions to properly use swarm testing.
- ``RuntimeError`` caused by a race condition when initializing Hypothesis' PRNG in multiple workers.
- Missing body in ``Case`` if it is mutated after the ``make_case`` call. :issue:`2208`
- Internal error when a rate limiter hits its limit. :issue:`2254`
- Internal error during reference resolving when using relative file paths.
- Ignoring property examples defined under the ``example`` key in Open API 2.0 schemas. :issue:`2277`

**Removed**

- Support for ``pytest<6.0``.

**Performance**

- Improve performance of copying schemas.

3.29.2

:version:`3.29.2 <v3.29.1...v3.29.2>` - 2024-05-31
--------------------------------------------------

**Fixed**

- Remove temporary ``print`` calls.

3.29.1

:version:`3.29.1 <v3.29.0...v3.29.1>` - 2024-05-31
--------------------------------------------------

**Fixed**

- Inlining too much in stateful testing.

3.29.0

:version:`3.29.0 <v3.28.1...v3.29.0>` - 2024-05-30
--------------------------------------------------

**Changed**:

- **INTERNAL**: Remove the ability to mutate components used in ``schema["/path"]["METHOD"]`` access patterns.

**Fixed**

- Not serializing shared parameters for an API operation.
- ``OperationNotFound`` raised in ``schema.get_operation_by_id`` if the relevant path item is behind a reference.
- Missing parameters shared under the same path in stateful testing if the path is behind a reference.
- ``KeyError`` instead of ``OperationNotFound`` when the operation ID is not found in Open API 3.1 without path entries.
- Not respecting ``allow_x00=False`` in headers and cookies. :issue:`2220`
- Internal error when building an error message for some network-related issues. :issue:`2219`

**Performance**

- Optimize ``schema["/path"]["METHOD"]`` access patterns and reduce memory usage.
- Optimize ``get_operation_by_id`` method performance and reduce memory usage.
- Optimize ``get_operation_by_reference`` method performance.
- Less copying during schema traversal.

3.28.1

:version:`3.28.1 <v3.28.0...v3.28.1>` - 2024-05-11
--------------------------------------------------

**Fixed**

- Internal error on unresolvable Open API links during stateful testing.
- Internal error when media type definition has only ``example`` or ``examples`` keys.

**Performance**

- Improve performance of ``add_link`` by avoiding unnecessary reference resolving.

Page 1 of 44

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.