MS製のテストケース作成ツール PICT

PICT はMicrosoftがフリーで提供するテストケース作成ツールです。All-Pair法により、品質を維持したまま、組み合わせテストのパターンを削減することができます。

導入

以下のサイトから Available Tools > PICT と辿り、pict33.msi をダウンロードします。http://www.pairwise.org/

ダウンロードしたMSインストーラファイルを実行すれば完了です。PICT はコマンドラインツールなので、コマンドプロンプトから pict と入力すると usage を見ることができます。

> 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

PICT の使い方

テストケースとして、フォントの表示をテストすることを考えます。パラメータとしてはサイズとカラー、ファミリとウエイトのパラメータがあり、以下のように変更できるとします。

size:   10, 11, 13, 17, 20, 25
color:  Black, Red, Blue, Yellow
family: Serif, Gothic, Arial
weight: nomal, bold

上記パラメータにて組み合わせテストを網羅使用とすると、6×4×3×2 の 144 ケースのテストを行う必要があります。このケースを All-Pair 法にて効率の良いテストケースを作成します。
上記のパラメータをそのまま model.txt として保存し以下のように実行します。

> pict model.txt

すると以下のように 24 パターンの組み合わせが出力されます。All-Pair 法により、実施すべきテストケースの数が 144 個から 24 個に削減されます。

size    color   family  weight
17      Blue    Serif   bold
25      Blue    Gothic  nomal
20      Red     Arial   nomal
13      Red     Gothic  bold
11      Black   Serif   nomal
11      Yellow  Arial   bold
11      Red     Gothic  nomal
17      Yellow  Gothic  nomal
10      Black   Gothic  bold
17      Black   Arial   bold
25      Yellow  Serif   bold
11      Blue    Arial   nomal
20      Yellow  Serif   bold
10      Red     Serif   nomal
25      Black   Arial   bold
20      Black   Gothic  nomal
17      Red     Gothic  bold
13      Blue    Arial   nomal
10      Yellow  Arial   nomal
10      Blue    Arial   nomal
13      Yellow  Serif   bold
20      Blue    Gothic  bold
25      Red     Arial   nomal
13      Black   Gothic  nomal

ファイルに落とす場合は以下のようにリダイレクトするだけです。

> pict model.txt > all-pair.txt