Specify Simulink® Coverage™ coverage results options.
Show Coverage Results Explorer after simulation. When you run a simulation, the Coverage Results Explorer opens to show the most recent coverage run.
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
The Coverage Results Explorer does not open after simulation.
You can open it later. Select Results Explorer from the Coverage Analyzer app.
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.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovShowResultsExplorer |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'on' |
Color blocks in the model based on coverage received during simulation.
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.
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.
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.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovHighlightResults |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'off' |
Create an HTML report containing coverage results after simulation.
An HTML report containing coverage results opens after simulation. Specify the report location using the parameter Output directory.
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.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovHtmlReporting |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'off' |
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.
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.
Coverage data is not stored in a MATLAB variable.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovSaveSingleToWorkspaceVar |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'off' |
Specify a name for the cvdata
object that contains coverage
results from the last simulation.
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
.
To enable this parameter, select:
Parameter:
CovSaveName |
Type: Character vector or string |
Value: Name to be given to
cvdata object |
Default:
'covdata' |
Create a new variable to store coverage results for each new simulation.
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.
Each new simulation overwrites the coverage results from the
previous simulation. A single cvdata
object
stores the coverage results from the most recent simulation.
To enable this parameter, select:
Parameter:
CovNameIncrementing |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'off' |
Specify name of .cvt
file to which coverage data is
automatically saved.
Enter file name. The default name is $ModelName$_cvdata
,
where $ModelName$
is the model name.
To enable this parameter, select:
Parameter:
CovDataFileName |
Type: Character vector or string |
Value: Name to be given to
.cvt file |
Default:
'$ModelName$_cvdata' |
Specify a folder in which coverage output files are saved.
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.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovOutputDir |
Type: Character vector or string |
Value: Path to folder |
Default:
'slcov_output/$ModelName$' |
Specify the formatting of certain aspects of the coverage report (HTML).
For an easier way to specify report formatting, see Report from Results Explorer.
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.
'-agT=1'
— Show aggregated tests
information in coverage report.
'-req=1'
— Include linked requirements
in aggregated coverage report.
To enable this parameter, select:
Parameter:
CovHTMLOptions |
Type: Character vector or string |
Value: |
Default: |
Include additional model coverage data from cvdata
objects in
the model coverage report.
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
.
To enable this parameter, select:
Parameter:
CovCompData |
Type: Character vector or string |
Value: Name of
cvdata object. |
Default: No default |
Update coverage report when you pause during simulation. The report is updated with coverage results up to the current pause or stop time.
Coverage report is updated when you pause simulation.
Coverage report is not updated when you pause simulation.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovReportOnPause |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'on' |
Save coverage data results to a file.
Coverage data results are saved to a file. Specify the file name using the parameter Autosave data file name.
Coverage data results are not saved to a file.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovSaveOutputData |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'on' |
Collect model coverage results from successive simulations. See also Cumulative Coverage Data.
For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.
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.
Model coverage data is retained for the most recent simulation only.
To enable this parameter, select Enable coverage analysis.
Parameter:
CovEnableCumulative |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'on' |
Show model coverage results from successive simulations in a single HTML report.
For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.
The HTML report shows model coverage data from successive simulations.
The HTML report shows model coverage data from the most recent simulation.
To enable this parameter, select:
Parameter:
CovCumulativeReport |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'off' |
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.
For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.
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.
The cvdata
object stores model coverage data
from the most recent simulation.
To enable this parameter, select:
Parameter:
CovSaveCumulativeToWorkspaceVar |
Type: Character vector or string |
Value:
'on' |'off' |
Default:
'off' |
Specify the name of the cvdata
object that saves coverage data
from successive simulations.
For an easier way to accumulate coverage data from multiple simulations, see Accumulating Coverage Data from the Results Explorer.
Enter variable name, for instance,
cumulativeCoverageData
.
To enable this parameter, select:
Parameter:
CovCumulativeVarName |
Type: Character vector or string |
Value: Name to be given to
cvdata object |
Default:
'covCumulativeData' |