Search⌘ K
AI Features

Laying Out State Machine Properties

Explore how to model and test systems using finite state machine properties in PropEr. Understand the structure of FSM models, command generators, and validation techniques to confidently apply state machine properties in Erlang testing.

The layout

State machine properties are very similar to regular stateful properties, conceptually speaking. They share the same three major components:

  • A model, which represents what the system should do at a high level.
  • A generator for commands, which represent the execution flow of the program.
  • An actual system, which is validated against our model.

Since FSM properties are really a specialization of stateful properties, the differences are subtle.

%0 node_1 Finite State Machines node_2 Model node_1->node_2 node_3 Commands node_1->node_3 node_4 Validation node_1->node_4
Components of a finite state property

The model

The model for state machine properties keeps the ...