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:
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
(SIL) mode with certain requirements met – as
described in Coverage for Models in Software-in-the-Loop (SIL) Mode).
If the simulation mode is set to any
mode other than
(SIL), coverage will not be measured during simulation.