Awesome Reviewers

Verification · Testing · Property-based tests

Stateful testing

Generate sequences of operations and check invariants after each.

How to build it

  1. Define the operations the system exposes and the preconditions for each.
  2. Generate random sequences of those operations and run them against the real object.
  3. Check the invariants after every step, not only at the end of a sequence.

Signals in a repository

  • Classes that subclass RuleBasedStateMachine in Hypothesis test files.
  • A proptest-state-machine dependency in Cargo.toml with state machine tests.

In practice

23 repositories run a tool for this check in the scanned set.

  • hypothesis · 10 repos
  • fast-check · 3 repos
  • proptest · 11 repos