cvtest

Create model coverage test specification object

Syntax

cvto = cvtest(root)
cvto = cvtest(root, label)
cvto = cvtest(root, label, setupcmd)

Description

The cvtest command creates a test specification object, that you simulate with the cvsim command.

cvto = cvtest(root) creates a test object with the handle cvto. root is the name of, or a handle to, a Simulink® model or a subsystem of a model. Only the specified model or subsystem and its descendants are subject to model coverage testing.

cvto = cvtest(root, label) creates a test object with the label label, which is used for reporting results.

cvto = cvtest(root, label, setupcmd) creates a test object with the setup command setupcmd and labels it with label. The setup command is executed in the base MATLAB® workspace just prior to running the instrumented simulation. This command is useful for loading data prior to a test.

A test object has the following structure.

Field

Description

id

Read-only internal data-dictionary ID

modelcov

Read-only internal data-dictionary ID

rootPath

Name of the system or subsystem instrumented for analysis

label

String used when reporting results

setupCmd

Command executed in the base workspace just prior to simulation

settings.condition

Set to 1 if condition coverage is desired

settings.decision

Set to 1 if decision coverage is desired

settings.mcdc

Set to 1 if MC/DC coverage is desired

settings.sigrange

Set to 1 if signal range coverage is desired

settings.tableExec

Set to 1 if lookup table coverage is desired

modelRefSettings.enable

String specifying one of the following values:

  • Off — Disables coverage for all referenced models

  • all — Enables coverage for all referenced models

  • filtered — Enables coverage only for referenced models not listed in the excludedModels subfield

modelRefSettings.excludeTopModel

Set to 1 if excluding coverage for the top model is desired

modelRefSettings.excludedModels

String specifying a comma-separated list of referenced models for which coverage is disabled

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS