Schemathesis

Latest version: v3.38.9

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

Scan your dependencies

Page 18 of 51

3.15.4

Not secure
This release makes Schemathesis work on schemas that do not comply with the Open API spec due to YAML specifics (missing quotes around keys that can be parsed as integers, booleans, etc)

Added

- Support generating data for Open API request payloads with wildcard media types. 1526

Changed

- Mark tests as skipped if there are no explicit examples and `--hypothesis-phases=explicit` is used. 1323
- Parse all YAML mapping keys as strings, ignoring the YAML grammar rules. For example, `on: true` will be parsed as `{"on": True}` instead of `{True: True}`. Even though YAML does not restrict keys to strings, in the Open API and JSON Schema context, this restriction is implied because the underlying data model
comes from JSON.
- **INTERNAL**: Improve flexibility of event serialization.
- **INTERNAL**: Store request / response history in `SerializedCheck`.

3.15.3

Not secure
Fixed

- Deduplication of failures caused by malformed JSON payload. 1518
- Do not re-raise `InvalidArgument` exception as `InvalidSchema` in non-Schemathesis tests. 1514

3.15.2

Not secure
This is a small bugfix release :)

:bug: Fixed

- Avoid generating negative query samples that result in an empty query.
- Editable installation via `pip`.

3.15.1

Not secure
This release adds a few improvements that simplify customization and fixes a few minor issues that appear when running in Docker.

:rocket: Added

- **OpenAPI**: Expose `APIOperation.get_security_requirements` that returns a list of security requirements applied to the API operation
- Attach originally failed checks to "grouped" exceptions.

:bug: Fixed

- Internal error when Schemathesis doesn't have permission to create its `hosts.toml` file.
- Do not show an internal Hypothesis warning multiple times when the Hypothesis database directory is not usable.
- Do not print not relevant Hypothesis reports when run in CI.
- Invalid `verbose_name` value in `SerializedCase` for GraphQL tests.

3.15.0

Not secure
Major improvements for GraphQL ![GraphQL_Logo](https://user-images.githubusercontent.com/1236561/166159270-2d6a7325-f932-452e-8f60-47748347d338.png)

This release introduces a bunch of nice improvements for GraphQL testing - now you can test mutations, extend Schemathesis with custom scalars, and run tests at least twice as fast as before!

Other things include cleaner `pytest` output, human-readable cassette payloads, reporting flaky failures, better negative testing, and much more! See below

:rocket: Added

- **GraphQL**: Mutations supports. Schemathesis will generate random mutations by default from now on.
- **GraphQL**: Support for registering strategies to generate custom scalars.
- Custom auth support for schemas created via `from_pytest_fixture`.

:wrench: Changed

- Do not encode payloads in cassettes as base64 by default. This change makes Schemathesis match the default Ruby's VCR behavior and
leads to more human-readable cassettes. Use `--cassette-preserve-exact-body-bytes` to restore the old behavior. 1413
- Bump `hypothesis-graphql` to `0.9.0`.
- Avoid simultaneous authentication requests inside auth providers when caching is enabled.
- Reduce the verbosity of the `pytest` output. A few internal frames and the "Falsifying example" block are removed from the output.
- Skip negative tests on API operations that are not possible to negate. 1463
- Make it possible to generate negative tests if at least one parameter can be negated.
- Treat flaky errors as failures and display a full report about the failure. 1081
- Do not duplicate failing explicit examples in the `HYPOTHESIS OUTPUT` CLI output section. 881

:bug: Fixed

- **GraphQL**: Semantically invalid queries without aliases.
- **GraphQL**: Rare crashes on invalid schemas.
- Internal error inside `BaseOpenAPISchema.validate_response` on `requests>=2.27` when response body contains malformed JSON. 1485
- `schemathesis.from_pytest_fixture`: Display each failure if Hypothesis found multiple of them.

🏎️ Performance

- **GraphQL**: Over 2x improvement from internal optimizations.

3.14.2

Not secure
🎉 [Schemathesis.io](http://schemathesis.io/): schema-based API testing as a service. 🎉

This release adds support for Schemathesis.io - you can upload your test results and visualize them.
Or, you can [signup](https://app.schemathesis.io/auth/sign-up/?utm_source=relnotes&utm_content=3.14.2&tier=pro) to a Pro account and use our servers to run enhanced tests against your API.

Feel free to join our [Discord](https://discord.gg/R9ASRAmHnA) - we'd love to hear your feedback!

:rocket: **CLI features**

- Support for auth customization & automatic refreshing. 966
- Open API link name customization via the `name` argument to `schema.add_link`.
- `st` as an alias to the `schemathesis` command line entrypoint.
- `st auth login` / `st auth logout` to authenticate with Schemathesis.io.
- `X-Schemathesis-TestCaseId` header to help to distinguish test cases on the application side. 1303
- Support for comma separated lists in the `--checks` CLI option. 1373
- Hypothesis Database configuration for CLI via the `--hypothesis-database` option. 1326
- Make the `SCHEMA` CLI argument accept API slugs from Schemathesis.io.

:bug: **Bug fixes**

- Using `schema.parametrize` with test methods on `pytest>=7.0`.
- Show the proper Hypothesis configuration in the CLI output. 1445
- Missing `source` attribute in the `Case.partial_deepcopy` implementation. 1429
- Duplicated failure message from `content_type_conformance` and `response_schema_conformance` checks when the checked response has no `Content-Type` header. 1394
- Not copied `case` & `response` inside `Case.validate_response`.
- Ignored `pytest.mark` decorators when they are applied before `schema.parametrize` if the schema is created via `from_pytest_fixture`. 1378

:wrench: **Chores and Improvements**
- Enable Open API links traversal by default. To disable it, use `--stateful=none`.
- Do not validate API schema by default. To enable it back, use `--validate-schema=true`.
- Add the `api_slug` CLI argument to upload data to Schemathesis.io.
- Show response status code on failing checks output in CLI.
- Improve error message on malformed Open API path templates (like `/foo}/`). 1372
- Improve error message on malformed media types that appear in the schema or in response headers. 1382
- Relax dependencies on `pyyaml` and `click`.
- Add `--cassette-path` that is going to replace `--store-network-log`. The old option is deprecated and will be removed in Schemathesis `4.0`

P.S. These release notes contain entries from multiple releases, as they were not properly displayed on GitHub before

Page 18 of 51

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.