因果图测试用例的设计步骤
1.确定软件规格需求中的原因和结果
Divide the specifications into workable pieces and Identify cause & effects in the specifications.
2.确定原因和结果之间的逻辑关系
Analyze the semantic content of the specification & transform it into a Boolean graph linking the cause and effects (Cause-Effect Graph)
3.确定因果图中的各种约束
Annotate the graph with constraints
4.画出因果图并转化为决策表
Convert graph into a limited-entry decision table.
5.根据决策表设计测试用例
章老师给的样例
(1)确定需求中的原因与结束
原因编号 | 内容 | |
c1 | 投入1元5角 | |
c2 | 投入2元 | |
c3 | 按下“可乐” | |
c4 | 按下“雪碧” | |
c5 | 按下“红茶” | |
结果编号 | 输出动作 | 需求 |
ef1 | 退还5角 | c2∩(c3∪c4∪c5) |
ef2 | 送出“可乐” | (c1∪c2)∩c3 |
ef3 | 送出“雪碧” | (c1∪c2)∩c4 |
ef4 | 送出“红茶” | (c1∪c2)∩c5 |
(2)建立原因结果的逻辑关系
见(1)需求部分
(3)确定约束
E(c1,c2); E(c3,c4,c5)
然后就可以画出画出因果图了
说到因果图的作用,百度百科给出解释,
原文:http://www.cnblogs.com/PreTang/p/4357861.html