测试用例设计-使用PICT工具设计测试用例

PICT介绍:

PICT全称Pairwise Independent Combinatorial Testing(成对独立组合测试)

PICT产生测试用例和测试配置。你可以通过使用PICT工具产生测试用例,它会比手工设计的测试用例更加有效,并且只需要手工设计测试用例的一小部分时间。

PICT可以有效地按照两两测试的原理,进行测试用例设计。在使用PICT时,需要输入与测试用例相关的所有参数,以达到全面覆盖的效果

Eg:

Type:          Single, Span, Stripe, Mirror, RAID-5
Size:          10, 100, 500, 1000, 5000, 10000, 40000
Format method: Quick, Slow
File system:   FAT, FAT32, NTFS
Cluster size:  512, 1024, 2048, 4096, 8192, 16384, 32768, 65536
Compression:   On, Off

 

这些值组合起来有数千种可能的值。如果我们要在合理的时间内测试所有的值,显得非常困难。因此,我们决定测试所有可能的配对。例如,{Single,FAT}是一对,{10,Slow}是另一对;  研究表明,测试所有配对是穷举测试的有效替代方案,而且成本更低。它将提供非常好的覆盖范围(覆盖率达到90%以上),并且保持测试用例的数量以及可管理。

 

PICT使用:

下载地址:http://www.pairwise.org/tools.asp

 

1、下载成功后,打开“pict33.msi”程序进行安装,点击“Next”按钮

 

2、勾选同意协议,单击“Next”按钮

 

3、设置安装目录,可以修改安装目录。我设置默认目录安装。

 

4、单击“Install”按钮,开始安装

 

5、安装完成,单击“Finish”按钮

 

6、打开安装目录下,新建txt文件编写测试参数(逗号和冒号要使用英文符号):

 

7、打开CMD命令窗口,切换PICT安装目录下,并输入命令:pict text.txt,得出56个测试用例

 

 

8、可以导出测试用例,命令:pict test.txt>test.xls。这样一来可以把测试用例结果写入在xls文档中

 

PICT更多特性:

Pairwise Independent Combinatorial Testing

Usage: pict model [options]

Options:
 /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

 各位读者可自行尝试。

 

 参考资料:https://github.com/microsoft/pict

posted @ 2019-01-14 11:36  乱石之渐  阅读(1139)  评论(0编辑  收藏  举报