Skip to content

Figure out configuration options for stateful machines #152

@Liam-DeVoe

Description

@Liam-DeVoe

Hypothesis puts configuration for stateful machines, like stateful_step_count, on @settings. This makes sense in Hypothesis because state machines are top-level tests. In Hegel, a single test case of a state machine is invoked by hegel::stateful::run inside of a hegel::test, so it's less clear where to place our stateful_step_count equivalent.

Options:

  • (1) Add to #[hegel::test] settings. Applies to all state machines invoke in that test.
  • (2) Add settings parameters to hegel::stateful::run. Applies to just that test case.
    • This implies stateful_step_count can vary between test cases. Are we okay with this? Will this cause flakiness?
  • (3) Add settings to #[hegel::state_machine]. Applies to that state machine for all test cases.

I think my preference is (3) > (2) > (1).

See also #148 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementit's not broken, but we want it to be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions