PICT—基于Pairwise的用例组合算法

2010-01-24  菜菜 

1、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-generated test suites cover all combinations of two therefore are much smaller than exhaustive ones yet still very effective in finding defects.    

官网:http://www.pairwise.org/

常用的Pairwise工具集:http://www.pairwise.org/tools.asp

2、通过对测试变量的所有维度及维度的组合,避免穷举测试所有维度的所有值及其组合来减少测试用例数量的一种方法

3、基于Pairwise算法的PICT工具:

      微软Pairwise算法程序Pairwise Independent Combinatorial Testing (PICT) Tool

      例如:准备文本文件(.txt)  内容包括(注意格式<ParamName> : <Value1>, <Value2>, <Value3>, ...)

      OS:WinNT,HP-UX,AIX,Solaries

      数据库:DB2,Oracle,SQLServer,PostgreSQL

      JDK:1.6.0,1.5.0

      字符集:utf-8,GBK

 4、通过PICT程序运算:

结果如上图,较一般的排列组合算法(各维度值乘积)明显较少

需将结果输出保存至文件:命令

D:\Program Files\PICT>pict test2.txt  > OutputFile.txt

D:\Program Files\PICT>pict test2.txt  > OutputFile.xls

5、PICT选项:

 /o:N    - Order of combinations (default: 2)

 /d:C    - Separator for values  (default: ,)

 /a:C    - Separator for aliases (default: |)

 /n:C    - Negative value prefix (default: ~)

 /e:file - File with seeding rows

 /r[:N]  - Randomize generation, N - seed

 /c      - Case-sensitive model evaluation

 /s      - Show model statistics

6、提供丰富的分组模式

另外:

PICT帮组手册:App/PICT/PICTHelp.htm

PICT最新下载:http://msdn.microsoft.com/en-us/testing/bb980925.aspx

1748°/17484 人阅读/0 条评论 发表评论

登录 后发表评论