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:

Examples

collapse all

Load the file myCovData.cvt while maintaining cumulative coverage results.

[covSettings,covData] = cvload('myCovData',1);

Input Arguments

collapse all

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

collapse all

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:

  1. Open the model for which you want to load existing coverage data.
  2. In the Apps tab, select Coverage Analyzer.
  3. In the Coverage tab, select Results Explorer.
  4. In the Coverage Results Explorer, right click Data Repository and select Load coverage data.
  5. Select the coverage data file that you want to load.

Version History

Introduced before R2006a

expand all

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.