pypi schemathesis 3.30.0
Release 3.30.0

latest releases: 3.38.7, 3.38.6, 3.38.5...
4 months ago

🚀 Added

  • EXPERIMENTAL: New stateful test runner in CLI. #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.
    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. #2234
  • Migrate to new-style pytest hooks. #2181
  • Filter out Hypothesis' warning about resetting the recursion limit in multi-worker tests.
  • Show sub-schema location in response_schema_conformance failure messages. #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. #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. #2208
  • Internal error when a rate limiter hits its limit. #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. #2277

🔥 Removed

  • Support for pytest<6.0.

🏎️ Performance

  • Improve performance of copying schemas.

Don't miss a new schemathesis release

NewReleases is sending notifications on new releases.