Using Simulink    

How the Model Coverage Tool Works

The Model Coverage Tool works by analyzing the execution of blocks that serve as decision points in your model. The block types that represent decision points include

If a model includes Stateflow charts, the tool also analyzes the states and transitions of those charts. During a simulation run, the tool records changes of state of the branch blocks and of states and transitions. At the end of the simulation, the tool computes for each decision point block and for each state and transition, the ratio of actual branches versus potential branches.

Using the Model Coverage Tool

To develop effective tests with the Model Coverage Tool,

  1. Develop one or more test cases for your model (see Creating and Running Test Cases).
  2. Run the test cases to verify that the model behavior is correct.
  3. Analyze the coverage reports produced by Simulink.
  4. Using the information in the coverage reports, modify the test cases to increase their coverage or add new test cases that cover areas not covered by the current set of test cases.
  5. Repeat the preceding steps until you are satisfied with the coverage of your test set.


 Model Coverage Tool Creating and Running Test Cases