PICT工具

简介:

PICT(Pairwise Independent Combinatorial Testing )工具原是微软公司内部使用的一款自动生成成对组合测试用例的命令行工具,现在对外提供,可以从互联网上下载到。

 

使用: 1.准备的文本文件(.txt)  内容包括(注意格式<ParamName> : <Value1>, <Value2>, <Value3>, ...),e.g

                OS:Win XP,Win 2003 server,Win7, Win NT4

                Language:English,German,Chinese                

                CLR:Installed,not installed

               MyApp:yes,no

               IE:5.0,6.0,7.0,8.0,Firefox

 

2.在命令行下运行pict程序,如下;

也可以把输出结果重定向到一个文件,e.g  E:\>pict  cc.txt >result.txt

E:\>pict cc.txt
OS      Language        CLR     MyApp   IE
Win NT4 English Installed       no      Firefox
Win XP  Chinese not installed   yes     6.0
Win7    German  not installed   no      5.0
Win 2003 server English Installed       yes     5.0
Win XP  Chinese Installed       no      7.0
Win NT4 German  not installed   yes     5.0
Win7    English Installed       yes     7.0
Win 2003 server German  not installed   no      7.0
Win 2003 server Chinese not installed   yes     Firefo
Win NT4 German  Installed       yes     8.0
Win 2003 server English not installed   no      8.0
Win7    Chinese not installed   yes     Firefox
Win XP  English not installed   yes     8.0
Win XP  Chinese not installed   no      5.0
Win7    German  Installed       no      6.0
Win NT4 Chinese not installed   yes     7.0
Win XP  German  Installed       yes     Firefox
Win NT4 English Installed       yes     6.0
Win7    Chinese Installed       no      8.0
Win 2003 server English not installed   no      6.0

 

3.更多的用法之约束条件

在有前提条件的情况下,如果MyApp的旧版本已经在目标机器上安装,那就说明CLR已经安装,那么就应该去掉MyApp:Yes和CLR:not installed这种不合逻辑的组合。e.g                OS:Win XP,Win 2003 server,Win7, Win NT4

Language:English,German,Chinese                

CLR:Installed,not installed                 

MyApp:yes,no                 

IE:5.0,6.0,7.0,8.0,Firefox                                

#MyApp need CLR                 

if [MyApp] = “yes” then [CLR]=“Installed”;

 

4.更多的用法之子模型

一般用测试用例需要同时考虑硬件和软件组合的情况下,例如:

PLATFORM:  x86, ia64, amd64

CPUS:      Single, Dual, Quad

RAM:       128MB, 1GB, 4GB, 64GB

HDD:       SCSI, IDE

OS:        NT4, Win2K, WinXP, Win2K3

IE:        4.0, 5.0, 5.5, 6.0

APP:       SQLServer, Exchange, Office

{ PLATFORM, CPUS, RAM, HDD } @ 3 { OS, IE } @ 2

 

层次关系

 

 

5.子模型与约束条件结合

PLATFORM: x86, ia64, amd64

CPUS:     Single, Dual, Quad

RAM:      128MB, 1GB, 4GB, 64GB

HDD:      SCSI, IDE

OS:       NT4, Win2K, WinXP, Win2K3

IE:       4.0, 5.0, 5.5, 6.0

{ PLATFORM, CPUS, RAM, HDD } @ 2 { OS, IE } @ 2

IF [PLATFORM] in {"ia64", "amd64"} THEN [OS] in {"WinXP", "Win2K3"}; IF [PLATFORM] = "x86" THEN [RAM] <> "64GB";

 

下载及帮助:

最新pict工具下载:

http://msdn.microsoft.com/en-us/testing/bb980925.aspx

PICT工具原理和算法实现可以参考这篇文章:

http://msdn.microsoft.com/en-us/library/cc150619.aspx

帮助文档: 安装目录下的 PICTHelp.htm

posted @ 2016-03-18 11:23  laly  阅读(407)  评论(0编辑  收藏  举报