Main Content

Coverage Analyzer

Analyze, view, and manage coverage data for Simulink models

Description

Use the Coverage Analyzer app to interactively perform coverage analysis, view coverage results, and manage coverage data for Simulink® models.

Coverage Analyzer tab of the Simulink toolstrip after performing coverage analysis.

Open the Coverage Analyzer App

In the Simulink toolstrip, on the Apps tab, under Model Verification, Validation, and Test, select Coverage Analyzer.

Examples

expand all

To analyze model coverage, you must enable coverage on the model. By default, Simulink Coverage™ analyzes block execution and decision coverage.

To analyze a model using the default coverage settings:

  • In the Coverage tab of the Simulink toolstrip, in the Status section, click the Coverage OFF button to toggle coverage on.

  • Optionally, click Cumulative Collection to enable or disable cumulative coverage.

  • Click Analyze Coverage.

To modify the default coverage settings,

  • Click Settings to open the Configuration Parameters dialog box.

  • Select Enable coverage analysis and then set Structural Coverage Level.

  • To select additional metrics, such as relational boundary coverage, click Other metrics to expand the list and select the metrics you want to analyze.

  • Click OK.

  • In the toolstrip, click Analyze Coverage.

To view model coverage results, enable coverage and click Analyze Coverage. Simulink Coverage opens the Coverage Details pane, which contains the model coverage report docked to the Simulink window.

To load the coverage results for a previous run, in the Review Results section, click Load Earlier Results. In the Select coverage data file dialog box, select the coverage data to load.

In the Coverage tab, under Review Results, click Coverage Highlighting.

If the Coverage Details pane does not open automatically, in the Coverage tab, click Coverage Details.

The Coverage Results Explorer is a tool that you can use to view, manage, and aggregate coverage data and create coverage reports.

In the Coverage tab, under Review Results, click Results Explorer.

To generate a report, after analyzing model coverage or loading coverage data, in the Coverage tab, under Review Results, click Generate Report.

Alternatively, you can create coverage reports by using the Coverage Results Explorer, cvhtml, or Simulink Test Manager (Simulink Test).

To load coverage results from an earlier run, in the Coverage tab, under Review Results, click Load Earlier Results.

In the Select coverage data file dialog box, select a coverage data file to load.

Alternatively, you can load coverage data by using the Coverage Results Explorer or cvload.

Related Examples

Parameters

expand all

Toggles model coverage analysis on and off.

Toggles cumulative coverage collection on and off.

Open the Configuration Parameters dialog box to the Coverage pane.

Version History

Introduced in R2019b