Assess a Model by Using
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.
Open the Test Harness
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:
OffModeis active when the value of
SlowModeis active when the value of
QuickModeis active for all other values of
Run the Model Assessments
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.
Test Assessment | Test Sequence |