What Is Orthogonal Array Testing?

Orthogonal Array Testing (OAT) uses mathematical structures called orthogonal arrays to generate test suites. These arrays guarantee that every pair of parameter values appears an equal number of times across all test cases, providing balanced, uniform coverage.

Origins: Taguchi Method

OAT originated from the Taguchi method in manufacturing quality engineering. Dr. Genichi Taguchi developed orthogonal arrays to efficiently test the impact of multiple factors on product quality. Software testing adopted this technique for combinatorial test design.

Understanding Orthogonal Arrays

An orthogonal array is a matrix where:

  • Rows = test cases
  • Columns = parameters (factors)
  • Values = levels of each parameter

The key property: for any two columns, every possible pair of values appears the same number of times.

Notation: L_n(k^f)

  • L = Latin square (the array type)
  • n = number of rows (test cases)
  • k = number of values per parameter (levels)
  • f = number of parameters (factors)

Example: L4(2^3) — 4 test cases, 3 parameters, 2 values each

TestP1P2P3
1000
2011
3101
4110

Check any two columns: every pair (0,0), (0,1), (1,0), (1,1) appears exactly once.

Common Orthogonal Arrays

ArrayTestsParametersValuesExhaustive
L4(2^3)4328
L8(2^7)872128
L9(3^4)94381
L16(2^15)1615232,768
L18(3^7)18732,187
L25(5^6)256515,625

OAT vs. Pairwise Testing

AspectOATPairwise
CoverageEvery pair appears equallyEvery pair appears at least once
BalancePerfectly balancedMay be unbalanced
FlexibilityFixed array sizesAdaptive to any parameter count
Mixed valuesHarder with mixed levelsHandles easily
OptimalityMathematically optimalNear-optimal (heuristic)
graph LR subgraph "OAT" A["Each pair: exactly N times"] end subgraph "Pairwise" B["Each pair: at least 1 time"] end subgraph "Exhaustive" C["All combinations"] end

Selecting the Right Array

Step 1: Count your parameters and values per parameter. Step 2: Find the smallest standard array that fits. Step 3: If parameters have different numbers of values, use mixed-level arrays or the “collapse” technique.

Example: 4 parameters with 3 values each → L9(3^4), which gives 9 test cases instead of 81.

Advanced OAT Techniques

Real-World Example: Browser Compatibility

Parameters:

  • Browser: Chrome, Firefox, Edge (3 levels)
  • OS: Windows, macOS, Linux (3 levels)
  • Resolution: 1080p, 1440p, 4K (3 levels)
  • Language: EN, ES, RU (3 levels)

Using L9(3^4):

TestBrowserOSResolutionLanguage
1ChromeWindows1080pEN
2ChromemacOS1440pES
3ChromeLinux4KRU
4FirefoxWindows1440pRU
5FirefoxmacOS4KEN
6FirefoxLinux1080pES
7EdgeWindows4KES
8EdgemacOS1080pRU
9EdgeLinux1440pEN

9 tests instead of 81. Every pair of values from any two parameters appears exactly once.

Mixed-Level Arrays

When parameters have different numbers of values, use mixed-level orthogonal arrays:

L18(2^1 x 3^7): 18 tests for 1 binary parameter + 7 three-level parameters.

For parameters with fewer levels than the array supports, map multiple array values to the same parameter value (collapsing).

Strength Beyond 2

Standard OAT provides strength 2 (all pairs). Higher-strength arrays cover triples, quadruples, etc.:

  • Strength 2: Every pair covered → catches 2-way interaction defects
  • Strength 3: Every triple covered → catches 3-way interaction defects
  • Strength t: Every t-tuple covered

Higher strength = more tests but catches rarer interaction defects.

When OAT Outperforms Pairwise

  1. Statistical analysis. OAT’s balanced coverage allows statistical analysis of which parameters most affect the outcome.
  2. Regulated industries. When you need mathematically provable coverage, OAT’s properties are auditable.
  3. Hardware testing. Where test execution is expensive, OAT’s optimal test count matters.

Tools for OAT

  • NIST covering arrays repository — pre-computed arrays
  • Jenny — open-source covering array generator
  • ACTS (NIST) — Automated Combinatorial Testing for Software
  • Manual lookup — standard arrays are published in textbooks and online catalogs

Exercise: Apply OAT to a Configuration Test

Scenario: You need to test a database configuration with:

  • DB Engine: MySQL, PostgreSQL, SQLite (3)
  • Connection Pool: 5, 20, 100 (3)
  • Cache: Enabled, Disabled, Partial (3)
  • Logging: Debug, Info, Error (3)

Tasks:

  1. What orthogonal array fits these parameters?
  2. How many test cases does it generate vs. exhaustive?
  3. Fill in the test matrix using L9(3^4)
  4. Verify that any two columns contain all 9 pairs exactly once
Hint

4 parameters x 3 values each = L9(3^4). Exhaustive = 3^4 = 81. Map the standard L9 array to your specific parameter values.

Solution

Array: L9(3^4) — 9 tests instead of 81 (89% reduction).

Standard L9 with mapped values:

TestDB EnginePoolCacheLogging
1MySQL5EnabledDebug
2MySQL20DisabledInfo
3MySQL100PartialError
4PostgreSQL5DisabledError
5PostgreSQL20PartialDebug
6PostgreSQL100EnabledInfo
7SQLite5PartialInfo
8SQLite20EnabledError
9SQLite100DisabledDebug

Verification (DB Engine x Pool):

  • MySQL-5, MySQL-20, MySQL-100 (each once)
  • PostgreSQL-5, PostgreSQL-20, PostgreSQL-100 (each once)
  • SQLite-5, SQLite-20, SQLite-100 (each once) All 9 pairs appear exactly once. Same holds for every other column pair.

Pro Tips

  • Use OAT when balance matters. If you need to statistically analyze which factor causes failures, OAT’s balanced design is essential.
  • Combine with BVA for value selection. OAT tells you which parameter combinations to test; BVA tells you which specific values to use for each level.
  • Fall back to pairwise for irregular parameter sets. If you have 12 parameters each with different numbers of values, pairwise tools like PICT are more practical than finding a matching orthogonal array.
  • Know the standard arrays. L4, L8, L9, L16, L18, L25, L27 cover most practical scenarios. Keep a reference table handy.
  • OAT reduces cost in hardware testing. When each test run costs real money (physical devices, cloud resources), the mathematical optimality of OAT saves budget.