Training COMMON CHALLENGES AND TIPS FOR SUCCESS12. Mistake to Avoid - Try not to use long lists of Values; instead, use Equivalence Classes and similar strategies

12. Mistake to Avoid - Try not to use long lists of Values; instead, use Equivalence Classes and similar strategies

This lesson describes why you should try to use small lists of Values where possible.

Long lists of Values always result in large numbers of tests...

Long lists of Values always result in large numbers of tests...

Reason:

  • Imagine you are testing an application that has a drop box with 500 city names.
  • And that the application has 5 different features that will be tested together with different cities...
  • If you list each city inidividually and create a set of 2-way tests, the smallest possible number of tests you would generate would be 500 X 5 = 2,500 tests.

Instead, define Equivalence Classes and enter those Equivalence Classes into Hexawise.

Depending upon the business rules and behaviors of the application you are testing, you might break your equvalence classes of cities into size-based categories or location-based categories such as these:

  • Population of city: under 1 million, 1 million - 2.99 million, 3 million - 8.99 million, Above 9 million

and/or

  • Location of city: Asia, Americas, Europe, Africa or Australia

If you reduced your list of city-related Values from 500 to 4, you would have far, far fewer pairwise tests generated when you click on the Create Tests button.

For more information:

  • Don't forget to explore Hexawise's Value Expansion feature here. Whenever you reduce the number of Values in Hexawise for a Parameter, you should consider using the Value Expansions feature.
  • See Wikipedia's description of Equivalence Class Partitioning
  • A simple 2-minute experiment demonstrates how important this lesson is:

- Create 2 test plans in Hexawise.

- Call the first plan "2p20v" (which is a fast way to create a plan with 2 Parameters that have 20 Values each.

- Call the second plan "20p2v"

- The plans will immediately self populate with the appropriate number of Parameters and Values

- The first plan has only 400 possible tests. All 400 tests are needed to achieve pairwise coverage.

- The second plan has more than a million possible tests. Only 11 tests are needed for pairwise coverage!