sltest.testmanager.CoverageSettings class

Package: sltest.testmanager

Modify coverage settings


Instances of sltest.testmanager.CoverageSettings let you set the setting under the Coverage Settings section in a test file, test suite, or test case.


The getCoverageSettings methods for test file, test suite, and test case objects returns a sltest.testmanager.CoverageSettings object, which lets you access the coverage collection and metric settings.


expand all

Specify if the coverage collection is on or off, false for off and true for on.

Coverage collection is enabled or disabled in the Test Manager under the Coverage Settings section. This property controls the Record coverage for system under test check box. The Record coverage for referenced models check box must be changed manually in the Test Manager and not programmatically.

Selection of coverage settings that are enabled or disabled, specified as a character vector. For the set of possible character vectors, see the parameter info for CovMetricSettings in Model Parameters (Simulink). Coverage metric settings can be modified only at a test-file level.

Coverage metrics are enabled or disabled in the Test Manager by selecting the check boxes in the Coverage Settings section.

Example: 'dw'


expand all

% Get coverage settings object from the test file
cov = getCoverageSettings(testfile);
cov.RecordCoverage = true;

% Enable MCDC and signal range coverage metrics
cov.MetricSettings = 'mr';

Introduced in R2016a

Was this topic helpful?