Chapter 6.2

Input Space Partitioning

Combination Strategies Criteria

  • Combination of Partitions:

    • Selection of blocks from multiple partitions simultaneously.

    • Example: Test case requires satisfaction of block 1 from q2 and block 3 from q3.

    • All Combinations: Using all possible combinations of partitions can be impractical.

Criterion 6.1: All Combinations Coverage (ACoC)
  • Definition: All combinations of blocks from all characteristics must be covered in tests.

  • Example: If three partitions with blocks [A, B], [1, 2, 3], [x, y], ACoC needs twelve tests:

    • (A, 1, x), (B, 1, x), (A, 1, y), (B, 1, y),

    • (A, 2, x), (B, 2, x), (A, 2, y), (B, 2, y),

    • (A, 3, x), (B, 3, x), (A, 3, y), (B, 3, y)

  • Test Count Formula: Number of tests=∏i=1 Q(Bi){Number\space of\space tests}=\prod i=1\space^{Q}\left(B_{i}\right) , where BiB_i is the number of blocks in partition ii. In this case the number of test would be 2×3×2=122×3×2=12

Criterion 6.2: Each Choice Coverage (ECC)
  • Definition: One value from each block for each characteristic must be included in at least one test.

  • Example: Using three blocks from previous example, valid tests like (A, 1, x), (B, 2, y), and (A, 3, x) can constitute ECC.

  • Minimum Tests Required: Number of tests=Max i=1 Q(Bi)Number\space of\space tests=Max\space i=1\space^{Q}\left(B_{i}\right) or in other words, the number of tests is the number of blocks in the largest characteristic.

Criterion 6.3: Pair-Wise Coverage (PWC)
  • Definition: Each block from every characteristic must be paired with blocks from other characteristics.

  • Example Combinations:

    • (A, 1)    (B, 1)    (1, x)

    • (A, 2)    (B, 2)    (1, y)

    • (A, 3)    (B, 3)    (2, x)

    • (A, x)    (B, x)    (2, y)

    • (A, y)    (B, y)    (3, x)

    • (3, y)

  • Minimum Test Count Formula: At least (Maxi=1 QBi)⋅(Maxi=1,j=1 QBj)\left(Max_{i=1}\space^{Q}B_{i}\right)\cdot\left(Max_{i=1,j=1}\space^{Q}B_{j}\right)

    • In this case we have max(|A| |B|, |A| |C|, |B| |C|)

    • = max(2×3, 2×2, 3×2)

    • = max(6, 4, 6)

    • = 6


Criterion 6.4: T-Wise Coverage (TWC)
  • Definition: Values from each block for each group of tt characteristics combined.

  • Implication: If t=Qt = Q, this is just all combinations.

  • Cost Consideration: TWC can become expensive very quickly for the number of test cases.

  • Examples:

    • T=1 → Each Choice Coverage (ECC)

    • T=2 → Pair-Wise Coverage (PWC)

    • T=Q( | Q = number of characteristics) → All Combinations Coverage (ACoC)


Criterion 6.5: Base Choice Coverage (BCC)
  • Definition: A base choice block selected for each characteristic to form base tests.

    • Pick a base choice, change one characteristic at a time for all other tests

  • Example: Given the following blocks and characteristics

    • A = [a1, a2]; B = [b1, b2], C = [c1, c2, c3]; D = [d1, d2], we have


    • Base

      a1 b1 c1 d1

      A

      a2 b1 c1 d1

      B

      a1 b2 c1 d1

      C

      a1 b1 c2 d1

      C

      a1 b1 c3 d1

      D

      a1 b1 c1 d2

  • Test Count Formula: 1+∑i=1Q(Bi−1)1+\sum_{i=1}^{Q}\left(B_{i}-1\right) where QQ is the number of characteristics and BiB_i is the number of blocks in the ithi^{th} characteristic.

    • In this case: 1(base) + [(2-1) + (2-1) + (3-1) + (2-1)]

    • = 1(base) + (1+1+2+1)

    • = 6


Criterion 6.6: Multiple Base Choice Coverage (MBCC)
  • Definition: More than one base choice for each characteristic may be selected, forming multiple base tests.

  • Example: Given the following blocks and characteristics

    • A = [a1, a2]; B = [b1, b2]; C = [c1, c2, c3]; D = [d1, d2]

    • Two base tests: a1, b1, c1, d1; a2, b2, c2, d2

    • Tests from a1, b1, c1, d1

      Base

      a1 b1 c1 d1

      C

      a1 b1 c2 d1

      A

      a2 b1 c1 d1

    • Tests from a2, b2, c2, d2

      Base

      a2 b2 c2 d2

      C

      a2 b2 c1 d2

      D

      a2 b2 c2 d1

  • Test Count Formula: Number of tests=M+∑i=1Q(M×(Bi−mi))Number\space of\space tests=M+\sum_{i=1}^{Q}\left(M\times\left(B_{i}-m_{i}\right)\right) where MM is # of base tests, QQ is # of characteristics, BiB_i is # of blocks in the ithi^{th} characteristic, and mim_i is the number of base choices selected for the ithi_{th} characteristic.

    • In this case:

    • M = 2

    • Q = 4 (A, B, C, D)

    • B = {2, 2, 3, 2}

    • m = {1, 1, 1, 1}

    • Number of tests = 2+∑i=14(2×(Bi−mi))2+\sum_{i=1}^4\left(2\times\left(B_{i}-m_{i}\right)\right)

    • = 2 + 2((2 - 1) + (2 - 1) + (3 - 1) + (2 - 1))

    • = 12

ISP Partitioning Combination Strategy Criteria Subsumption