64 Model-Based Testing for Embedded Systems
already in their expected states. Hardcoding the individual device wait times in the test
script may thus result in spurious test failures (or successes) if the devices do not reach
their expected states in the order they are checked.
Hint: Sample a “base time” when the stimulus is applied and sense that
each device reaches its expected state within a specified interval from the
base time.
This mechanism does not always guarantee that slow-responding devices will not cause
spurious failures.
• Executing the Sense methods takes some time. Even with the base time approach, it
is possible that a slow Sense method call may cause a later Sense method call to start
later than its timeout with respect to the base