帮助中心帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
分析模型以获得缺失的模型覆盖率
[status, cvdo] = sldvgencov(model, options, showUI, startCov)
[status, cvdo] = sldvgencov(block, options, showUI, startCov)
[status, cvdo, filenames] = sldvgencov(model, options, showUI, startCov)
[status, cvdo, filenames, newmodel] = sldvgencov(block, options, showUI, startCov)
[status, cvdo] = sldvgencov(model, options, showUI, startCov) 使用 sldvoptions 对象 options 分析模型model 。
status
cvdo
model
options
showUI
startCov
sldvoptions
[status, cvdo] = sldvgencov(block, options, showUI, startCov) 使用 sldvoptions 对象 options 分析原子子系统block。
block
示例
[status, cvdo, filenames] = sldvgencov(model, options, showUI, startCov) 分析 model 并返回软件在 filenames 中创建的文件名。
filenames
[status, cvdo, filenames, newmodel] = sldvgencov(block, options, showUI, startCov) 使用 sldvoptions 对象 options 分析 block 。该软件返回一个newmodel的句柄,其中包含block子系统的副本。
newmodel
全部折叠
分析覆盖率数据并收集缺失的覆盖率数据。
分析巡航控制模型,并使用来自先前分析的测试用例的数据仿真该模型的某个版本。比较模型覆盖率数据并收集sldvdemo_cruise_control_mod模型分析中缺失的覆盖率:
sldvdemo_cruise_control_mod
opts = sldvoptions; % Generate test cases opts.Mode = 'TestGeneration'; % Specify MCDC coverage opts.ModelCoverageObjectives = 'MCDC'; % Don't create harness model opts.SaveHarnessModel = 'off'; % or report opts.SaveReport = 'off'; openExample('sldv/ExtendTestCasesForModifiedModelExample',... 'supportingFile', 'sldvdemo_cruise_control'); [ status, files ] = sldvrun('sldvdemo_cruise_control', opts); open_system 'sldvdemo_cruise_control_mod'; [ outData, startCov ] = sldvruntest('sldvdemo_cruise_control_mod',... files.DataFile, [], true); cvhtml('Coverage with the original test suite', startCov); [ status, covData, files ] = sldvgencov('sldvdemo_cruise_control_mod',... opts, false, startCov);
处理 Simulink®模型中的原子子系统。
[]
处理 Simulink模型。
指定分析参数的sldvoptions对象。
指示在分析过程中在何处显示消息的逻辑值:
true
false
cvdata 对象。该分析忽略了 startCov 中已经满足的模型覆盖率目标。
cvdata
cvdata 对象包含新测试的覆盖率数据。
一种结构体,其字段列出了分析所得的文件名。
DataFile
包含原始输入数据的 MAT 文件。
HarnessModel
Simulink框架模型。
Report
结果的 HTML 报告。
ExtractedModel
从子系统中提取的Simulink模型。
BlockReplacementModel
模块替换后获得的Simulink模型。
指示分析是否收集了模型覆盖率的逻辑值。
double
如果使用 block 调用 API,则软件将返回 newmodel 中新模型的句柄,其中包含原子子系统block 的副本。
在 R2007a 中推出
sldvruntest | sldvmergeharness | sldvoptions | sldvrun
sldvruntest
sldvmergeharness
sldvrun
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office