成对组合覆盖这一概念是Mandl于1985年在测试Aad编译程序时提出来的。Cohen等人应用成对组合覆盖测试技术对Unix中的“Sort”命令进行了测试。测试结果表明覆盖率高达90%以上。可见成对组合覆盖是一种非常有效的测试用例设计方法。
成对组合覆盖要求任意两个因素(输入条件)的所有水平组合至少要被覆盖1次。组合覆盖的算法已经被很多工具实现,测试人员可以直接利用这些工具,例如:TConfig、微软的PICT等。下面介绍一下使用PICT设计测试用例的过程。
PICT,全称是Pairwise Independent Combinatorial
官网:http://www.pairwise.org/
常用的Pairwise工具集:http://www.pairwise.org/tools.asp
上下载到。
PICT工具原理和算法实现可以参考http://msdn.microsoft.com/en-us/library/cc150619.aspx
Pairwise算法理论依据及现实需求:
Pairwise (a.k.a. all-pairs) testing is an effective test case generation technique that is based on the observation that most faults are caused by interactions of at most two factors. Pairwise-gen