cvload - Load coverage tests and stored results into memory - MATLAB (original) (raw)
Load coverage tests and stored results into memory
Syntax
Description
[[covSettings](#mw%5Fe8181cde-8aba-4b17-a512-4a017f67e74d),[covData](#mw%5Fb17e139f-fc5a-42bf-bf46-893fe867d2a7)] = cvload([fileName](#mw%5F973ae41a-906e-4ab9-80c0-5f6135132239))
loads the tests and data stored in the specified file.
[[covSettings](#mw%5Fe8181cde-8aba-4b17-a512-4a017f67e74d),[covData](#mw%5Fb17e139f-fc5a-42bf-bf46-893fe867d2a7)] = cvload([fileName](#mw%5F973ae41a-906e-4ab9-80c0-5f6135132239),[restoreTotal](#mw%5Fb4d76e27-4086-4b38-8f18-a902c52fa07f))
restores or clears the cumulative results from prior runs depending on the value ofrestoreTotal
.
Note
When using the cvload
command:
- If a model with the same name exists in the coverage database,
cvload
only 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,
cvload
resolves the links to the existing models. - When you are loading several files that reference the same model,
cvload
only 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
cvdata
objects for the same model if thedbVersion
properties match.
Examples
Load the file myCovData.cvt
while maintaining cumulative coverage results.
[covSettings,covData] = cvload('myCovData',1);
Input Arguments
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 infileName
.
Example: 'myCoverageData'
Data Types: char
| string
Cumulative data restoration setting, specified as 1
or0
. If restoreTotal
is set to1
, cvload
restores the cumulative results from prior runs. If restoreTotal
is set to 0
or unspecified, cvload
clears the cumulative results.
Data Types: double
Output Arguments
Coverage settings, returned as a cell array of cvtest
objects. The coverage settings are returned as cvtest
objects even if you did not use cvtest
and cvsim
to collect the original data.
Data Types: cell
Coverage data, returned as a cell array of cvdata
objects.covData
has the same size as covSettings
, but if a settings entry has no results,covData
can contain empty elements.
Alternatives
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 History
Introduced before R2006a
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.