主要内容

模型和代码测试度量

R2026b
收集包括基于需求的测试和代码测试在内的模型测试度量

使用模型和代码测试度量来评估软件单元模型的测试的状态。打开模型测试仪表板来监控工程中的单元和模型测试工件。当您定义工件(如需求、设计单元模型和运行单元测试)时,仪表板会测量每个单元的测试工件的可追溯性和完整性。完成模型测试后,打开 SIL 代码测试或 PIL 代码测试仪表板,分别监控软件在环 (SIL) 或处理器在环 (PIL) 代码测试结果。使用度量结果来添加缺失的可追溯性链接,填补测试缺口,并跟踪测试进度。您还可以使用度量 API 以编程方式收集度量结果(例如在持续集成系统中),并将结果保存在报告中。

App

模型测试仪表板评估模型和生成的代码的验证状态和质量

类

全部展开

metric.Engine收集度量结果
metric.ResultResults from specified metric
metric.config.ConfigurationModify and manage custom threshold configurations (自 R2026b 起)
metric.threshold.ThresholdSetSet of thresholds that define compliance criteria for metric results (自 R2026b 起)
metric.threshold.ThresholdRuleThreshold rule that classifies metric result into compliance category (自 R2026b 起)
metric.threshold.ClassificationClassification that defines compliance criteria for threshold rule (自 R2026b 起)

函数

全部展开

modelTestingDashboard打开模型测试仪表板
digitalthread.settingsView and update digital thread settings (自 R2025a 起)
metric.loadB2BResultsView comparison results from back-to-back testing metric (自 R2024a 起)
digitalthread.StorageMap.forProjectCreate storage map for current project (自 R2026b 起)
digitalthread.uri.fromFilePathGet digital thread URI from file path (自 R2026b 起)
digitalthread.uri.toAbsoluteFilePathConverts digital thread URI to absolute file path (自 R2026b 起)
digitalthread.uri.toRelativeFilePathConverts digital thread URI to relative file path (自 R2026b 起)
digitalthread.uri.requirements.fromObjectGet digital thread URI from Requirements Toolbox object (自 R2026b 起)
digitalthread.uri.requirements.toObjectConvert digital thread URI to Requirements Toolbox object (自 R2026b 起)
digitalthread.uri.simulink.fromObjectGet digital thread URI from Simulink or Stateflow object (自 R2026b 起)
digitalthread.uri.simulink.toObjectConvert digital thread URI to Simulink object (自 R2026b 起)
digitalthread.uri.simulinktest.fromObjectGet digital thread URI from Simulink Test object (自 R2026b 起)
digitalthread.uri.simulinktest.toObjectConvert digital thread URI to Simulink Test object (自 R2026b 起)

主题

工程模型测试

模型测试

代码测试

仪表板和度量的自定义项

工件可追溯性