Class PairwiseCombinationGenerator
java.lang.Object
org.wildfly.qa.tooling.pairwise.PairwiseCombinationGenerator
Generates test combinations of base layers with decorator layer subsets.
Produces combinations of decorator layers in sizes 2 and 3 (pairs and triples), filters out combinations containing mutually exclusive layers, and pairs each with a base layer (round-robin). This ensures all 2-way and 3-way decorator interactions are tested.
Usage example:
List<LayerCombination> combinations = PairwiseCombinationGenerator.builder()
.baseLayers("ee-core-profile-server", "jaxrs-server")
.decorators("ejb", "jpa", "jsf")
.mutuallyExclusive("embedded-activemq", "remote-activemq")
.build()
.generate();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder forPairwiseCombinationGenerator.static classA single test case: one base layer plus decorator layers. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to limit the number of generated combinations. -
Method Summary
-
Field Details
-
MAX_COMBINATIONS_PROPERTY
System property to limit the number of generated combinations. When set, combinations are subsampled proportionally from pairs and triples with even spacing. When unset or-1, all combinations are generated.- See Also:
-
-
Method Details
-
builder
Creates a new builder for configuring the generator. -
generate
Generates valid layer combinations: each decorator pair and triple combined with a rotating base layer, excluding combinations that contain mutually exclusive layers. IfMAX_COMBINATIONS_PROPERTYis set, subsamples proportionally.- Returns:
- list of layer combinations
-