Documentation

自动覆盖工作流程

Customize and automate model coverage collection

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.

Functions

expand all

slvnvlogsignals Log test data for component or model during simulation
slvnvmergedata Combine test data from data files
slvnvmakeharness 生成Simulin金宝appk覆盖线束模型
slvnvharnessopts Generate default options for slvnvmakeharness
slvnvmergeharness Combine test data from harness models
slvnvruntest Simulate model by using input data
slvnvruncgvtest Invoke Code Generation Verification (CGV) API and execute model
slvnvruntestopts Generate simulation or execution options for slvnvruntest or slvnvruncgvtest
slvnvextract Extract subsystem or subchart contents into new model
slcovmex Build coverage-compatible MEX-function from C/C++ code
cvtest 创建模型覆盖测试规范对象
cvsim 模拟和返回测试对象的模型覆盖结果
cvexit 退出模型覆盖环境
cvload Load coverage tests and stored results into memory
CVSAVE Save coverage tests and results to file
cvresults Returns active coverage data, clears and loads active coverage data from a file
cvmodelview Display model coverage results with model coloring
procentyInfo Retrieve condition coverage information from cvdata object
decisioninfo 从CVDATA对象检索决策覆盖信息
executioninfo Retrieve execution coverage information from cvdata object
getCoverageInfo 从CVDATA对象检索Simulink Design验证器块的覆盖范金宝app围信息
mcdcinfo 从CVDATA对象检索修改后的条件/决策范围信息
complexityinfo Retrieve cyclomatic complexity coverage information from cvdata object
overflowsaturationinfo Retrieve saturation on integer overflow coverage from cvdata object
relationalboundaryinfo 从CVDATA对象检索关系边界覆盖率
sigrangeinfo 从CVDATA对象检索信号范围覆盖范围信息
sigsizeinfo Retrieve signal size coverage information from cvdata object
tableinfo Retrieve lookup table coverage information from cvdata object
cvhtml 从模型覆盖对象产生HTML报告
slwebview_cov 将Simuli金宝appnk模型导出到具有覆盖范围的Web视图

Classes

expand all

slcoverage.blockselector 选择覆盖过滤器的块
slcoverage.CodeSelector Select custom C/C++ code for coverage filter
slcoverage.Filter Coverage filter set
slcoverage.FilterRule Create coverage filtering rule
slcoverage.metricselector 选择覆盖过滤器的度量标准
Slcoverage.Selector Get selectors of all types
slcoverage.sfcnselector 选择用于过滤规则的S功能标准

Topics

用CVTEST创建测试

Create a test object that specifies the model or part of the model tested.

Run Tests with cvsim

Execute (simulate) the test object. This creates a results object for the test object.

Create HTML Reports with cvhtml

为结果对象创建报告。

Save Test Runs to File with cvsave

Save the test object and its results object in a file.

Load Stored Coverage Test Results with cvload

Load the file containing test and results objects to create new reports of model coverage data.

Retrieve Coverage Details from Results

Retrieve specific coverage information after simulation using MATLAB commands.

Use Coverage Commands in a Script

演示如何使用模型覆盖命令的示例脚本。

Creating and Executing Test Cases

此示例显示了如何使用Simulink®Coverage™组件金宝app验证功能来记录输入信号,创建线束模型和执行测试用例。

Command Line Verification Tutorial

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.

记录覆盖范围in Parallel Simulations by Using Parsim

This example shows how to record coverage in multiple parallel Simulink® simulations corresponding to different test cases by using SimulationInput objects and theparsimcommand.