Schemathesis

Latest version: v3.38.10

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

Scan your dependencies

Page 13 of 51

3.20.0

:version:`3.20.0 <v3.19.7...v3.20.0>` - 2023-10-18
--------------------------------------------------

**Added**

- Support for ``application/xml`` serialization based on Open API schema definitions. :issue:`733`
- Hook shortcuts (``filter_query``, ``map_header``, etc.) to minimize boilerplate in extensions. :issue:`1673`
- Support for colored output from docker container. :issue:`1170`
- A way to disable suggestion for visualizing test results via the ``SCHEMATHESIS_REPORT_SUGGESTION=0`` environment variable. :issue:`1802`
- Automatic FastAPI fixup injecting for ASGI loaders, eliminating the need for manual setup. :issue:`1797`
- Support for ``body`` hooks in GraphQL schemas, enabling custom filtering or modification of queries and mutations. :issue:`1464`
- New ``filter_operations`` hook to conditionally include or exclude specific API operations from being tested.
- Added ``contains`` method to ``ParameterSet`` for easier parameter checks in hooks. :issue:`1789`
- Automatic sanitization of sensitive data in the output is now enabled by default. This feature can be disabled using the ``--sanitize-output=false`` CLI option. For more advanced customization, use ``schemathesis.sanitizing.configure()``. :issue:`1794`
- ``--experimental=openapi-3.1`` CLI option for experimental support of OpenAPI 3.1. This enables compatible JSON Schema validation for responses, while data generation remains OpenAPI 3.0-compatible. :issue:`1820`

**Note**: Experimental features can change or be removed in any minor version release.

**Changed**

- Support ``Werkzeug>=3.0``. :issue:`1819`
- Refined generated reproduction code and shortened ``X-Schemathesis-TestCaseId`` for easier debugging. :issue:`1801`
- Add ``case`` as the first argument to ``AuthContext.set``. Previous calling convention is still supported. :issue:`1788`
- Disable the 'explain' phase in Hypothesis to improve performance. :issue:`1808`
- Simplify Python code samples for failure reproduction.
- Do not display ``InsecureRequestWarning`` in CLI output if the user explicitly provided ``--request-tls-verify=false``. :issue:`1780`
- Enhance CLI output for schema loading and internal errors, providing clearer diagnostics and guidance. :issue:`1781`, :issue:`1517`, :issue:`1472`

Before:

.. code:: text

Failed to load schema from https://127.0.0.1:6423/openapi.json
You can use `--wait-for-schema=NUM` to wait for a maximum of NUM seconds on the API schema availability.

Error: requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=6423): Max retries exceeded with url: /openapi.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:992)')))

Add this option to your command line parameters to see full tracebacks: --show-errors-tracebacks

After:

.. code:: text

Schema Loading Error

SSL verification problem

[SSL: WRONG_VERSION_NUMBER] wrong version number

Tip: Bypass SSL verification with `--request-tls-verify=false`.

**Deprecated**

- Defining ``AuthProvider.get`` with a single ``context`` argument. The support will be removed in Schemathesis ``4.0``.

**Fixed**

- Fixed type hint for ``AuthProvider``. :issue:`1776`
- Do not skip negative tests if the generated value is ``None``.
- Lack of execution for ASGI events during testing. :issue:`1305`, :issue:`1727`
- Confusing error message when trying to load schema from a non-existing file. :issue:`1602`
- Reflect disabled TLS verification in generated code samples. :issue:`1054`
- Generated cURL commands now include the ``Content-Type`` header, which was previously omitted. :issue:`1783`
- Improperly serialized headers in ``SerializedHistoryEntry.case.extra_headers``.

**Performance**

- Optimize event data emission by postponing code sample generation, resulting in a ``~4%`` reduction in the emitted events data size.

**Removed**

- Unused ``SerializedError.example`` attribute. It used to be populated for flaky errors before they became regular failures.
- Unused ``TestResult.overridden_headers`` attribute.

3.19.7

:version:`3.19.7 <v3.19.6...v3.19.7>` - 2023-09-03
--------------------------------------------------

**Fixed**

- ``Unsatisfiable`` error for multiple security schemes applied to the same API operation and an explicit ``Authorization`` header. :issue:`1763`

3.19.6

:version:`3.19.6 <v3.19.5...v3.19.6>` - 2023-08-14
--------------------------------------------------

**Fixed**

- Broken ``--report`` CLI argument under ``click>=8.1.4``. :issue:`1753`

3.19.5

:version:`3.19.5 <v3.19.4...v3.19.5>` - 2023-06-03
--------------------------------------------------

**Fixed**

- Do not raise ``Unsatisfiable`` when explicit headers are provided for negative tests.
- Do not raise ``Unsatisfiable`` when no headers can be negated.

3.19.4

:version:`3.19.4 <v3.19.3...v3.19.4>` - 2023-06-03
--------------------------------------------------

**Fixed**

- Improved handling of negative test scenarios by not raising ``Unsatisfiable`` when path parameters cannot be negated but other parameters can be negated.

3.19.3

:version:`3.19.3 <v3.19.2...v3.19.3>` - 2023-05-25
--------------------------------------------------

**Changed**

- Support ``requests<3``. :issue:`1742`
- Bump the minimum supported ``Hypothesis`` version to ``6.31.6`` to reflect requirement from ``hypothesis-jsonschema``.

**Fixed**

- ``HypothesisDeprecationWarning`` regarding deprecated ``HealthCheck.all()``. :issue:`1739`

Page 13 of 51

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.