A Combinatorial Test Model (CTM) defines a view of the system under test which can be used for automatic generation of data sets. A more formal introduction was documented in this 2005 paper. The focus of this note is to go through a simple example and discuss the use of components that make up a CTM.
A CTM model is the blueprint of a combinatorial data generator based on covering (pair-wise) arrays, permutations, combinations, variations, and supports constraints such as inclusions and exclusions. The main components of a model are covering arrays, parameters, value domains, interactions and constraints.
Covering Array
A covering array is the blueprint of a two-dimensional array. The columns are defined through parameters; each row represents a combination of values for each of the parameters. One common use is to generate the domain of values for another parameter by using Value Placeholders. Below is a covering array used to generate all 52 cards in a standard deck, instead of listing each card individually.
Another example is a generator of "persons" by using specific male/female given names, with generic surnames. A Union is used to create a set combining the output of the two different given names generator, with the generic name list.
Parameter Placeholder vs. Value Placeholder
A parameter placeholder allows to group parameters based on different strengths, and still combine all in one covering array. For example, some parameters should be tested with higher strength (numbers of combinations) due to their importance/risk, while others can be paired with much lower strength. This is an effective mechanism to manage risk vs. numbers of combinations. In the model below, CA1 strength can be set to 3 (all possible combinations) while all other array could be set to 2.
A value placeholder allows the output from a covering array to be used as the domain of values for a parameter in another covering array. This is useful for hierarchical structures (e.g. CTM generated from XSDs).
Union vs. Partition
Two or more arrays with the same set of parameters can be combined in a union. This allows for effective management of possible combinations. A partition is simply a mechanism to break arrays which would otherwise be too "long" (in the diagram view), without functional loss.