Repository navigation
v2.2.0
Stateful / model-based testing (Wave 4); additive, no BC breaks, seed sequences
of existing generators are unchanged.
- Add stateful / model-based testing in the new
Rasuvaeff\PropertyTesting\StateMachine
namespace: theCommandinterface (preCondition/nextState/run/postCondition,
\Stringablelabel),Gen::commands($initialModel, $commandGenerators, $minLength, $maxLength)
producing aCommandSequencearbitrary, andStateMachine::check($sequence, $systemFactory)
to drive the sequence against a fresh system under test. Generated sequences are
valid by construction; shrinking drops command blocks (down to a single command,
isolating a failing middle step) and simplifies each command's parameters. A failed
postcondition throwsPostconditionViolationnaming the failing step and trace. - Render
\Stringablearguments via__toString()in counterexamples and verbose
logs (previously objects showed only their class name). - Report the failure of the shrunk run in the counterexample, not the original
draw — theFailure:line now matches the minimisedShrunk:arguments.