Load coverage tests and stored results into memory
When using the
If a model with the same name exists in the coverage database,
cvloadonly loads the compatible results that reference the existing model to prevent duplication.
If the Simulink® models referenced from the file are open, but do not exist in the coverage database,
cvloadresolves the links to the existing models.
When you are loading several files that reference the same model,
cvloadonly loads the results that are consistent with the earlier files.
Starting in R2020b, you can load coverage data created in R2017b or later. You can aggregate coverage data from two or more
cvdataobjects for the same model if the
Load Coverage Data and Preserve Cumulative Data
Load the file
myCovData.cvt while maintaining cumulative coverage
[covSettings,covData] = cvload('myCovData',1);
fileName — Name of coverage data file
character array |
Name of coverage data file, specified as a character array or string array.
fileName must be a coverage data file with the
.cvt extension. You do not need to include the extension in
restoreTotal — Cumulative data restoration setting
0 (default) |
Cumulative data restoration setting, specified as
restoreTotal is set to
cvload restores the cumulative results from
prior runs. If
restoreTotal is set to
cvload clears the cumulative results.
covSettings — Coverage settings
Coverage settings, returned as a cell array of
cvtest objects. The
coverage settings are returned as
cvtest objects even if you did not
cvsim to collect the original
covData — Coverage data
Coverage data, returned as a cell array of
covData has the same size as
covSettings, but if
a settings entry has no results,
covData can contain empty elements.
You can load existing coverage data in the Coverage Results Explorer:
Open the model for which you want to load existing coverage data.
In the Apps tab, select Coverage Analyzer.
In the Coverage tab, select Results Explorer.
In the Coverage Results Explorer, right click Data Repository and select Load coverage data.
Select the coverage data file that you want to load.
Version HistoryIntroduced before R2006a
R2020b: Load and view coverage data from previous releases
You can load and view coverage data from previous releases as far back as R2017b.
After you import coverage data from a previous release, you can extract information using the API. You can aggregate coverage data that have matching release versions.