Main Content

生成测试

生成测试集以满足模型和代码覆盖率以及自定义测试准则

测试生成会为模型生成输入值序列以满足测试准则,例如模型覆盖率。Simulink® Design Verifier™ 可根据基于需求的测试扩展现有模型覆盖率信息。它会生成附加测试输入序列,以满足在基于需求的测试期间未满足的覆盖率目标。使用这些测试输入可以更好地了解缺失需求以及创建更完整的测试工具。

模块

全部展开

Test ConditionConstrain signal values in test cases
Test ObjectiveDefine custom objectives that signals must satisfy in test cases
DetectorDetect true duration on input and construct output true duration based on output type
ExtenderExtend true duration of input
ImpliesSpecify condition that produces a certain response
Within ImpliesVerify response occurs within desired duration
Verification SubsystemSpecify proof or test objectives without impacting simulation results or generated code

函数

全部展开

sldvoptionsCreate design verification options object
sldv.conditionTest condition function for Stateflow charts and MATLAB Function blocks
sldv.testTest objective function for Stateflow charts and MATLAB Function blocks
sldvextractExtract subsystem or subchart contents into new model for analysis
sldvtimerIdentify, change, and display timer optimizations
sldvoptionsCreate design verification options object
sldvrunAnalyze model
sldvlogsignalsLog simulation input port values
sldvgencovAnalyze models to obtain missing model coverage
sldvgenspreadsheetGenerate spreadsheet containing test cases (自 R2022b 起)
sldvruntestSimulate model by using input data
sldvruntestoptsGenerate simulation or execution options for sldvruntest or sldvruncgvtest
sldvharnessoptsDefault options for sldvmakeharness
sldvmakefilterGenerate filter file containing justification rules for objectives with Unsatisfiable, Dead Logic, Falsified, Falsified - No Counterexample, or Error - Needs Simulation status in sldvData file (自 R2022a 起)
sldvmakeharnessGenerate harness model
sldvmergeharnessMerge test cases and initializations into one harness model
sldvreportGenerate Simulink Design Verifier report
sldvchecksumReturns checksum of model (自 R2021a 起)

主题

入门知识

为模型决策覆盖率生成测试

为模型中的自定义代码生成测试

为可分析的模型组件生成测试

生成测试以完成生成代码的覆盖率分析