CS FundamentalsVery hardProduct company interview · GATE level

A configuration test has four parameters: browser (4 values), OS (3 values), language (2 values) and network (2 values). What is the minimum number of test cases that covers every pair of values of every two parameters (pairwise testing)?

  1. A. 8
  2. B. 9
  3. C. 12
  4. D. 48

Correct answer: C. 12

Any pairwise suite must contain all 4 x 3 = 12 browser-OS pairs, and each test covers only one of them, so at least 12 tests are needed. 12 are also enough: a computer search finds language and network values for the 12 browser-OS rows that cover every other pair, for example (browser, OS, language, network numbered from 0) 0000, 0100, 0211, 1000, 1100, 1211, 2000, 2101, 2210, 3011, 3110, 3200. Exhaustive testing would need 4 x 3 x 2 x 2 = 48. 9 applies to four 3-valued parameters, not this mix.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic