Class PrimitiveStrengthGroup
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.model.PrimitiveStrengthGroup
-
public class PrimitiveStrengthGroup extends Object
Class representing a group of parameters which should be tested at another strength than the default testing strength.This concept is in general called mixed-strength combinatorial testing where there is a defined default testing strength and a number of parameter groups which deviate from this default strength. Such a mechanism is useful to model multiple subsystems in a combinatorial test without increasing the testing strength between the subsystems unnecessarily. Additionally, parameters which are prone to appear in failure-causing combinations can be tested at a higher strength to increase confidence.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
List<it.unimi.dsi.fastutil.ints.IntSet>
getAllSubGroups()
Returns all possible sub groups of sizestrength
in thisPrimitiveStrengthGroup
.int
getNumberOfParameters()
it.unimi.dsi.fastutil.ints.IntSet
getParameters()
int
getStrength()
int
hashCode()
static PrimitiveStrengthGroup
ofHighestStrength(it.unimi.dsi.fastutil.ints.IntSet parameters)
Constructs a newPrimitiveStrengthGroup
between the given parameters of the highest possible strength.static PrimitiveStrengthGroup
ofStrength(it.unimi.dsi.fastutil.ints.IntSet parameters, int strength)
Constructs a newPrimitiveStrengthGroup
between the given parameters and the used strength.String
toString()
-
-
-
Method Detail
-
ofStrength
public static PrimitiveStrengthGroup ofStrength(it.unimi.dsi.fastutil.ints.IntSet parameters, int strength)
Constructs a newPrimitiveStrengthGroup
between the given parameters and the used strength.- Parameters:
parameters
- the parameters in the group which should be tested to the given higher testing strength. Must not benull
strength
- the strength to which the given parameters should be tested. Must not be negative and must be at most the number of parameters in the group- Returns:
- the created group at the given strength
-
ofHighestStrength
public static PrimitiveStrengthGroup ofHighestStrength(it.unimi.dsi.fastutil.ints.IntSet parameters)
Constructs a newPrimitiveStrengthGroup
between the given parameters of the highest possible strength. In practice this means that the cartesian product between the values of the given parameters has to appear in the final test suite.- Parameters:
parameters
- the parameters to test at the highest possible strength. Must not benull
- Returns:
- the created groups at a strength equal to the number of parameter in the group
-
getParameters
public it.unimi.dsi.fastutil.ints.IntSet getParameters()
-
getNumberOfParameters
public int getNumberOfParameters()
-
getStrength
public int getStrength()
-
getAllSubGroups
public List<it.unimi.dsi.fastutil.ints.IntSet> getAllSubGroups()
Returns all possible sub groups of sizestrength
in thisPrimitiveStrengthGroup
.For example, if this
PrimitiveStrengthGroup
consists of parameters [0, 1, 2, 3] and the strength is 2, then the following sets are returned: {0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}.If the strength is zero and empty list is returned.
- Returns:
- all possible sub-combinations of the parameters in this groups which have the size
strength
. Never returnsnull
-
-