LoginSignup
16
8

More than 5 years have passed since last update.

All-Pairs法でテストケースを生成するツール「PICT」をMacで使う方法

Posted at

本稿ではAll-Pairs法(ペアワイズ法)でテストケースを生成してくれるpictをいうツールをMacで使う方法を紹介する。

pictのインストール

Homebrewでインストールできる

brew install pict
$ 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

モデル(因子と水準)を作る

因子と水準を定義したモデルをテキストファイルとして作る

parameters.txt
OS: Windows, Linux, macOS
PHP: 7.1, 7.2, 7.3
データベース: MySQL, PostgreSQL, SQLite

テストケースを生成する

$ pict parameters.txt
OS  PHP データベース
macOS   7.2 PostgreSQL
Linux   7.2 MySQL
macOS   7.3 SQLite
Linux   7.1 SQLite
Linux   7.3 PostgreSQL
Windows 7.2 SQLite
macOS   7.1 MySQL
Windows 7.1 PostgreSQL
Windows 7.3 MySQL

統計情報

/sオプションをつけると統計情報を見れる。

$ pict parameters.txt /s
Combinations:   27 … 全網羅
Generated tests:9 … All-Pairs法
Generation time:0:00:00

関連

16
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
8