This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

sltest.testmanager.CoverageSettings class

Package: sltest.testmanager
Superclasses:

Modify coverage settings

Description

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

Construction

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.

Properties

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 Coverage Settings. The corresponding UI option is Record coverage for system under test.

Coverage collection for referenced models is enabled or disabled in the Test Manager Coverage Settings. The corresponding UI option is Record coverage for referenced models.

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'

Examples

collapse 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