本稿では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