LoginSignup
2
2

More than 5 years have passed since last update.

pictを使って複数パラメータを掛け合わせた有効な最少テストケースを洗い出す

Posted at

複数パラメータを掛けあわせた有効なテストケースを全て網羅するのって辛いですよね
pairwiseという方法を使ってテストの質を落とさずに組み合わせに必要なテストケース数を削減することが可能です

pairwiseを採用しているMicrosoft/pictを使って有効なテストケースを洗い出す方法を確認します

  1. pictをダウンロードして展開
  2. 手順に従い make -> make test
  3. ソースとなるテキストデータを作成する
source.txt
week: sun, mon, tue, wed, thu, fri, sat
month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
day: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
  1. ./pict source.txt で実行
result
week    month   day
wed 7   11
thu 5   26
(中略)
fri 7   30
mon 12  26

こんな感じで必要なテストケースが表示されます
全パターン網羅する場合よりは少なくなっているはずです

2
2
1

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
2
2