This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Coverage Data Collection

Collect coverage data during simulation


slcovmex Build coverage-compatible MEX-function from C/C++ code
cvtest Create model coverage test specification object
cvsim Simulate and return model coverage results for test objects
cvhtml Produce HTML report from model coverage objects
cvmodelview Display model coverage results with model coloring
mcdcinfo Retrieve modified condition/decision coverage information from cvdata object


Model Coverage

Model Coverage

Validate your model tests by measuring how thoroughly the model objects are tested.

Model Coverage Collection Workflow

Develop effective tests with model coverage.

Types of Model Coverage

Model coverage metrics provided by Simulink® Verification and Validation™ .

Modified Condition and Decision Coverage (MCDC) Definitions in Simulink Verification and Validation

Describes the definitions of MCDC coverage used in Simulink Verification and Validation.

View Coverage Results in a Model

Highlight model elements to view coverage results.

Model Coverage for MATLAB Functions

Use model coverage for MATLAB® Function blocks and interpret the results.

Model Coverage for Stateflow Charts

Determine the extent to which a model test case exercises simulation control flow paths through a model.

Model Coverage for Multiple Instances of a Referenced Model

Collect model coverage when a model has multiple Model blocks that reference the same model.

Analyzing MCDC for Cascaded Logic Blocks

This example illustrates how Simulink Verification and Validation records the MCDC metric for a cascade of Logical Operator blocks.

Obtain Cumulative Coverage for Reusable Subsystems and Stateflow® Constructs

Create and view cumulative coverage results for a model with a reusable subsystem.

Logical Operator Cascade Patterns

This model includes various patterns of cascaded Logical Operator blocks.

Simulink Optimizations and Model Coverage

Learn how inlined parameters, block reduction, and conditional input branch execution can affect your model coverage data.

Model Objects That Receive Coverage

Model objects that receive model coverage during simulation.

Model Objects That Do Not Receive Coverage

Simulink objects that do not receive coverage.

Code Coverage

Specify Code Coverage Options

Set options for code coverage.

Types of Code Coverage

Perform several types of code coverage analysis for models in SIL mode, PIL mode, and for the code within supported S-Function and MATLAB Function blocks.

Coverage for Models with Code Blocks and Simulink Blocks

Record coverage for models with a combination of code blocks and other Simulink blocks.

Coverage for C and C++ S-Functions

Analyze model coverage for C/C++ S-Functions.

Code Coverage for Models in Software-in-the-Loop (SIL) Mode and Processor-in-the-Loop (PIL) Mode (Embedded Coder)

Configure code coverage for SIL and PIL simulations and review results.

Model and Code Coverage

Specify Coverage Options

In the Simulink Editor, specify several coverage recording options.

Create and Run Test Cases

Create and run test cases by using the model coverage MATLAB commands cvtest and cvsim.

Cumulative Coverage Data

Collect cumulative model coverage from successive simulation runs.

Was this topic helpful?