This example shows how to use
When decomposition in a Test Sequence block to author assessments in a test harness.
This model implements a simple signal tracker that operates in three modes:
1 (Slow), and
To observe the output and error of the signal tracker, simulate the model.
The SimpleTracker subsystem has a test harness that contains a Test Assessment block.
The Test Assessment block assesses the behavior of the SimpleTracker subsystem by using a
When decomposition test sequence.
The test sequence determines the appropriate verify() statements to run based on the value of
CheckError step has a
When decomposition with three substeps:
OffMode is active when the value of
SlowMode is active when the value of
QuickMode is active for all other values of
To run the assessments, simulate the test harness. Open the Simulation Data Inspector to inspect the result of the assessments.
Close the test harness and main model.