Model Coverage

Model coverage helps you validate your model tests by measuring how thoroughly the model objects are tested. Model coverage calculates how much a model test case exercises simulation pathways through a model. Model coverage is a measure of how thoroughly a test case tests a model and the percentage of pathways that a test case exercises. Model coverage helps you validate your model tests.

Model coverage analyzes the execution of the following types of model objects that directly or indirectly determine simulation pathways through your model:

  • Simulink® blocks

  • Models referenced in Model blocks

  • The states and transitions of Stateflow® charts

During a simulation run, the tool records the behavior of the covered objects, states, and transitions. At the end of the simulation, the tool reports the extent to which the run exercised potential simulation pathways through each covered object in the model.

The Simulink Verification and Validation™ software can only collect coverage for a model if its simulation mode is set to Normal. If the simulation mode is set to any mode other than Normal, coverage will not be measured during simulation.

For the types of coverage that model coverage performs, see Types of Model Coverage. For an example of a model coverage report, see Top-Level Model Coverage Report.

Was this topic helpful?