Behavior and commands
Run stateful tests
runBehavior
Behavior
Describes behavior of a stateful test.
abstract initializeState
Creates a new state.
abstract initialPrecondition
Returns true if the given state satisfies the initial precondition.
abstract createSystem
Creates a new system with the given state.
abstract destroySystem
Destroy the given system.
abstract generateCommands
Generates a list of commands to run on the given state.
optional setUp
Called before the cycle is run. Default implementation does nothing.
optional setUpAll
Called once before all cycles are run. Default implementation does nothing.
optional tearDown
Called after the cycle is run. Default implementation does nothing.
optional tearDownAll
Called once after all cycles are run. Default implementation does nothing.
Generate values and perform actions
Action
A command that performs actions with generated values.
Depending on the number of arbitraries, there are Action0
through Action8
. Action1
is type alias of Action
.
Initialize and finalize
Initialize
A command that initializes the state and system with another command.
The command enclosed with Initialize
are always executed first and are not called in subsequent steps. If there are multiple Initialize
commands, they are executed in the order they were defined.
Finalize
A command that finalizes the state and system with another command.
The command enclosed with Finalize
is always executed last and is not called in previous steps. The Finalize
command is not executed in any step other than the last one.