scalacheck
scalacheck copied to clipboard
Populate initial state from the SUT
Currently stateful tests by design assume that the SUT will created according to initial state. However, this poses a problem in some circumstances which require the opposite - populating initial state from the current state of the SUT. What is the recommended way to do that?
Details Imagine a hardware system that exposes an API. The system has a number of states between which it can transition. The test model is comprised of attributes reflect the state of the system. Those attributes mimic inherent attributes of the hardware under test, so initial state of the model needs to be populated from the current state of the hardware. How can this be achieved with scalacheck?