Coverage Pane: Results

Coverage Results Pane Overview

Specify Simulink® Coverage™ coverage results options.

Show Results Explorer

Show Coverage Results Explorer after simulation. When you run a simulation, the Coverage Results Explorer opens to show the most recent coverage run.

Settings

On (default)

When you run a simulation, the Coverage Results Explorer opens to show the most recent coverage run. See Access, Manage, and Accumulate Coverage Results​​ by Using the Results Explorer

Off

The Coverage Results Explorer does not open after simulation.

You can open it later. Select Results Explorer from the Coverage Analyzer app.

Note

You can access the Results Explorer from the Simulink Coverage contextual tabs, which appear when you open the Coverage Analyzer app, under Model Verification, Validation, and Test.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovShowResultsExplorer
Type: Character vector or string
Value: 'on'|'off'
Default: 'on'

Display coverage results using model coloring

Color blocks in the model based on coverage received during simulation.

Settings

On

Coverage results are displayed on the model. If a model receives incomplete coverage during simulation, it is colored light red. If it receives complete coverage, it is green. See also View Coverage Results in a Model.

Off (default)

Coverage results are not displayed on the model.

You can enable coloring based on coverage later. Select Results Explorer from the Coverage Analyzer app. In the Coverage Results Explorer, select a coverage result from the data repository. Select Highlight model with coverage results below the coverage results summary.

Note

If you use the toolbar buttons to simulate a model with coverage enabled, this setting is not honored and the model coloring for coverage results appears after each simulation. You can click Highlight model with coverage results in the Results Explorer to enable or disable model coverage highlighting. You can access the Results Explorer from the Simulink Coverage contextual tabs, which appear when you open the Coverage Analyzer app, under Model Verification, Validation, and Test. For more information, see Accessing Coverage Data from the Results Explorer.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovHighlightResults
Type: Character vector or string
Value: 'on'|'off'
Default: 'off'

Generate report automatically after analysis

Create an HTML report containing coverage results after simulation.

Settings

On

An HTML report containing coverage results opens after simulation. Specify the report location using the parameter Output directory.

Off (default)

The HTML report is not generated after simulation.

You can generate the report later. Select Results Explorer from the Coverage Analyzer app. In the Coverage Results Explorer, select a coverage result from the data repository. Select Generate report below the coverage results summary.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovHtmlReporting
Type: Character vector or string
Value: 'on'|'off'
Default: 'off'

Save last run in workspace variable

Save the coverage data from simulation in a MATLAB® variable.

You can retrieve coverage information from this variable later. For instance, to retrieve decision coverage information, use the decisioninfo function. For the full list of functions, see Automate Coverage Workflows.

Settings

On

Coverage data is stored in a cvdata object in the MATLAB workspace. Specify the object name using the parameter Last coverage run variable name. Choose to create a new object for each simulation using the parameter Increment variable name with each simulation.

Off (default)

Coverage data is not stored in a MATLAB variable.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovSaveSingleToWorkspaceVar
Type: Character vector or string
Value: 'on'|'off'
Default: 'off'

Last coverage run variable name

Specify a name for the cvdata object that contains coverage results from the last simulation.

Settings

Enter a name, for instance, coverageData.

If you want a new variable to store coverage results for each simulation, use the parameter Increment variable name with each simulation. The new variable name is created by appending a counter value to the original name, for instance, coverageData1, coverageData2, and so on.

The default variable name is covdata.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovSaveName
Type: Character vector or string
Value: Name to be given to cvdata object
Default: 'covdata'

Increment variable name with each simulation

Create a new variable to store coverage results for each new simulation.

Settings

On

A new cvdata object stores coverage results for each simulation.

The new variable name is created by appending a counter value to the original variable name from the first simulation. Specify the original variable name using the parameter Last coverage run variable name.

Off (default)

Each new simulation overwrites the coverage results from the previous simulation. A single cvdata object stores the coverage results from the most recent simulation.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovNameIncrementing
Type: Character vector or string
Value: 'on'|'off'
Default: 'off'

Autosave data file name

Specify name of .cvt file to which coverage data is automatically saved.

Settings

Enter file name. The default name is $ModelName$_cvdata, where $ModelName$ is the model name.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovDataFileName
Type: Character vector or string
Value: Name to be given to .cvt file
Default: '$ModelName$_cvdata'

Output directory

Specify a folder in which coverage output files are saved.

Settings

Enter path to folder. You can enter the absolute path or path relative to the current working folder.

By default, the files are saved in a subfolder slcov_output/$ModelName$ relative to the current working folder. Here $ModelName$ is the model name.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovOutputDir
Type: Character vector or string
Value: Path to folder
Default: 'slcov_output/$ModelName$'

Coverage report options

Specify the formatting of certain aspects of the coverage report (HTML).

Note

For an easier way to specify report formatting, see Report from Results Explorer.

Settings

Enter a space-separated list of flags. The available flags are:

  • '-sRT=0' — Do not show report

  • '-sVT=1' — Open a web view of the report in a browser. See also Export Model Coverage Web View.

  • '-aTS=1' — Show each test in the model summary.

  • '-bRG=1' — Show bar graphs in the model summary.

  • '-bTC=1' — Use two color bar graphs (red, blue).

  • '-hTR=1' — Display hit/count ratio in the model summary.

  • '-nFC=0' — Do not report fully covered model objects

  • '-scm=1' — Include cyclomatic complexity numbers in summary. See also Cyclomatic Complexity.

  • '-bcm=1' — Include cyclomatic complexity numbers in block details.

  • '-xEv=0' — Filter Stateflow® events from report.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovHTMLOptions
Type: Character vector or string
Value:
Default:

Additional data to include in coverage report

Include additional model coverage data from cvdata objects in the model coverage report.

Settings

Enter the name of a cvdata object associated with a simulation.

You get a cvdata object when you record coverage and save coverage data in a workspace variable. See:

You also get a cvdata object if you run simulation using the cvsim function. See cvsim.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovCompData
Type: Character vector or string
Value: Name of cvdata object.
Default: No default

Update coverage results on pause

Update coverage report when you pause during simulation. The report is updated with coverage results up to the current pause or stop time.

Settings

On (default)

Coverage report is updated when you pause simulation.

Off

Coverage report is not updated when you pause simulation.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovReportOnPause
Type: Character vector or string
Value: 'on'|'off'
Default: 'on'

Save output data

Save coverage data results to a file.

Settings

On (default)

Coverage data results are saved to a file. Specify the file name using the parameter Autosave data file name.

Off

Coverage data results are not saved to a file.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovSaveOutputData
Type: Character vector or string
Value: 'on'|'off'
Default: 'on'

Enable cumulative data collection

Collect model coverage results from successive simulations. See also Cumulative Coverage Data.

Note

For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.

Settings

On (default)

Model coverage data from successive simulations are collected together.

To show the cumulative data in one report, use the parameter Include cumulative data in coverage report. To save the data in one workspace variable, use the parameters Save cumulative coverage results in workspace variable and Cumulative coverage variable name.

Off

Model coverage data is retained for the most recent simulation only.

Dependency

To enable this parameter, select Enable coverage analysis.

Command-Line Information

Parameter: CovEnableCumulative
Type: Character vector or string
Value: 'on'|'off'
Default: 'on'

Include cumulative data in coverage report

Show model coverage results from successive simulations in a single HTML report.

Note

For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.

Settings

On

The HTML report shows model coverage data from successive simulations.

Off (default)

The HTML report shows model coverage data from the most recent simulation.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovCumulativeReport
Type: Character vector or string
Value: 'on'|'off'
Default: 'off'

Save cumulative coverage results in workspace variable

Save model coverage data from successive simulations in a single cvdata object in the MATLAB workspace.

You can retrieve coverage information from this variable later. For instance, to retrieve decision coverage information, use the decisioninfo function. For the full list of functions, see Automate Coverage Workflows.

Note

For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.

Settings

On

A single cvdata object stores model coverage data from successive simulations. See Cumulative Coverage Data.

Specify the variable name using the parameter Cumulative coverage variable name.

Off (default)

The cvdata object stores model coverage data from the most recent simulation.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovSaveCumulativeToWorkspaceVar
Type: Character vector or string
Value: 'on'|'off'
Default: 'off'

Cumulative coverage variable name

Specify the name of the cvdata object that saves coverage data from successive simulations.

Note

For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.

Settings

Enter variable name, for instance, cumulativeCoverageData.

Dependency

To enable this parameter, select:

Command-Line Information

Parameter: CovCumulativeVarName
Type: Character vector or string
Value: Name to be given to cvdata object
Default: 'covCumulativeData'