Model coverage commands let you automate the entire model coverage process with MATLAB® scripts. You can use model coverage commands to set up model coverage tests, execute them in simulation, and store and report the results.
|Log test data for component or model during simulation|
|Combine test data from data files|
|Generate Simulink Coverage harness model|
|Generate default options for slvnvmakeharness|
|Combine test data from harness models|
|Simulate model by using input data|
|Invoke Code Generation Verification (CGV) API and execute model|
|Generate simulation or execution options for slvnvruntest or slvnvruncgvtest|
|Extract subsystem or subchart contents into new model|
|Build coverage-compatible MEX-function from C/C++ code|
|Create model coverage test specification object|
|Simulate and return model coverage results for test objects|
|Exit model coverage environment|
|Load coverage tests and stored results into memory|
|Save coverage tests and results to file|
|Returns active coverage data, clears and loads active coverage data from a file|
|Display model coverage results with model coloring|
|Retrieve condition coverage information from cvdata object|
|Retrieve decision coverage information from cvdata object|
|Retrieve execution coverage information from cvdata object|
|Retrieve coverage information for Simulink Design Verifier blocks from cvdata object|
|Retrieve modified condition/decision coverage information from cvdata object|
|Retrieve cyclomatic complexity coverage information from cvdata object|
|Retrieve saturation on integer overflow coverage from cvdata object|
|Retrieve relational boundary coverage from cvdata object|
|Retrieve signal range coverage information from cvdata object|
|Retrieve signal size coverage information from cvdata object|
|Retrieve lookup table coverage information from cvdata object|
|Extract subsystem coverage data from system-level coverage data|
|Produce HTML report from model coverage objects|
|Export Simulink models to Web views with coverage|
|Select blocks for coverage filter|
|Select custom C/C++ code for coverage filter|
|Coverage filter set|
|Create coverage filtering rule|
|Select metric criterion for coverage filter|
|Get selectors of all types|
|Select S-function criterion for filtering rule|
Create a test object that specifies the model or part of the model tested.
Execute (simulate) the test object. This creates a results object for the test object.
Create a report for the results object.
Save the test object and its results object in a file.
Load the file containing test and results objects to create new reports of model coverage data.
Retrieve specific coverage information after simulation using MATLAB commands.
Example script that demonstrates how to use the model coverage commands.
This example shows how to use Simulink® Coverage™ component verification functions to log input signals, create a harness model, and execute test cases.
This example creates three test cases for an adjustable rate limiter and analyzes the resulting model coverage using the command-line API of the Model Coverage tool.
This example shows how to record coverage in multiple parallel Simulink® simulations corresponding to different test cases by using SimulationInput objects and the