Main Content

本页采用了机器翻译。点击此处可查看英文原文。

getVerificationStatus

类: slreq.Reference
命名空间: slreq

查询引用需求验证状态摘要

语法

status = getVerificationStatus(ref)
status = getVerificationStatus(ref, 'self')

说明

status = getVerificationStatus(ref) 返回引用需求 ref 及其所有子引用的验证状态摘要。

status = getVerificationStatus(ref, 'self') 仅返回引用需求 ref 的验证状态摘要。

输入参数

全部展开

引用的需求实例,指定为 slreq.Reference 对象。

输出参量

全部展开

引用需求及其子引用的验证状态摘要,以包含这些字段的 MATLAB® 结构体返回。

具有验证链接的引用需求(包括子引用)的总数,以 double 形式返回。

通过与其相关测试的引用需求(包括子引用)的总数,以 double 形式返回。

未通过与其相关测试的引用需求的总数(包括子引用),以 double 的形式返回。

具有未执行关联测试的引用需求(包括子引用)的总数,以 double 形式返回。

需要验证的引用需求(包括子引用)的总数,以 double 形式返回。

不包含验证对象链接的引用需求(包括子引用)的总数,以 double 形式返回。

示例

获取参考需求的验证状态摘要

% Get the verification status summary of the referenced requirement ref 
% and all its child references
refVerifStatus = getVerificationStatus(ref)

refVerifStatus = 

  struct with fields:

          total: 70
         passed: 45
         failed: 7
     unexecuted: 10
      justified: 1
           none: 7

% Get the verification status summary of only the referenced requirement myRef
myRefVerifStatus = getVerificationStatus(myRef, 'self')

myRefVerifStatus = 

  struct with fields:

        passed: 1
        failed: 0
    unexecuted: 0
     justified: 0
          none: 0

提示

版本历史记录

在 R2018b 中推出