【2-3】设计元素的图覆盖

1.设计元素的图是基于不同软件组件之间的连接,这种连接被称为依赖关系,也被称为couplings(耦合)。

2.调用图(最常见的结构化设计测试图)

(1)Nodes:Units         (2)Edges:Calls to units

①Node coverage:对于每个单元至少调用一次(method coverage)

②Edge coverage:执行每个调用至少一次(call coverage)

调用图在类上面的问题:每个类方法都是独立的,可能并不会互相调用

3.继承和多态

 

 4.继承图上面的覆盖

(1) OO Call Coverage: TR contains each reachable node in the call graph of an object instantiated for each class in the class hierarchy.(一个实例化对象即可)

(2) OO Object Call Coverage: TR contains each reachable node in the call graph of every object instantiated for each class in the class hierarchy.(每个实例化对象)

5.一些定义:

(1)调用者(caller): A unit that invokes another unit

(2)被吊用着(callee): The unit that is called

(3)调用状态(callsite):Statement or node where the call appears

(4)Actual parameter:Variable in the caller

(5)Formal parameter: Variable in the callee

6.Inter - procedural DU Pairs

一般来说,我们只关注last-def 和 first -use,其定义如下:

·Last-def 调用状态前的最后一次定义

·First-use:调用状态后的初次使用

 

 7.Data Flow at the design level

①All-Coupling-Def coverage:every last def to at least one first use

②All-Coupling-use Coverage:every last def to every first use

③All-Coupling-du-Paths Coverage: every simple path from every last def to every first use

△ 对于数组来说,对任意一个元素的引用视为对整个数组的引用

8.总结:

调用图是集成测试非常有用的方法,数据流相对容易计算,也常用在集成测试中

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值