Skip to content

Release 3.18.3

Choose a tag to compare

@Stranger6667 Stranger6667 released this 12 Feb 22:48
· 5406 commits to master since this release
v3.18.3
10c389b

🎉 Quality of life improvements to Schemathesis stateful testing! Enjoy

🚀 Added

  • APIStateMachine.run method to simplify running stateful tests.

🔧 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

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