Package de.rwth.swc.coffee4j.engine
Class CombinatorialTestModel
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.CombinatorialTestModel
-
- All Implemented Interfaces:
InputParameterModel
public final class CombinatorialTestModel extends java.lang.Object implements InputParameterModel
A class containing all important information needed for one combinatorial test. This includes the desired testing strength, the parameters and forbidden/error constraints. Forbidden constraints should never appear in any test input as they just cannot be executed, while error constraints should lead to validation or other kinds of errors in an application and should therefore be tested
-
-
Constructor Summary
Constructors Constructor Description CombinatorialTestModel(int strength, int[] parameterSizes)Defines a new model without any constraints.CombinatorialTestModel(int strength, int[] parameterSizes, java.util.Collection<TupleList> forbiddenTupleLists)Defines a new model with just forbidden constraints but no error constraints.CombinatorialTestModel(int strength, int[] parameterSizes, java.util.Collection<TupleList> forbiddenTupleLists, java.util.Collection<TupleList> errorTupleLists)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)java.util.List<TupleList>getErrorTupleLists()java.util.List<TupleList>getForbiddenTupleLists()int[]getParameterSizes()intgetStrength()inthashCode()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.rwth.swc.coffee4j.engine.InputParameterModel
getNumberOfParameters, getSizeOfParameter
-
-
-
-
Constructor Detail
-
CombinatorialTestModel
public CombinatorialTestModel(int strength, int[] parameterSizes)Defines a new model without any constraints.- Parameters:
strength- the desired testing strength. Must be equal to or greater than one and at most the number of parametersparameterSizes- the sizes of all parameters. [2, 3, 5] means the first parameter has 2 values, the second one 3 and the last one 5. All parameters need to have at least two values. Must not benull
-
CombinatorialTestModel
public CombinatorialTestModel(int strength, int[] parameterSizes, java.util.Collection<TupleList> forbiddenTupleLists)Defines a new model with just forbidden constraints but no error constraints.- Parameters:
strength- the desired testing strength. Must be equal to or greater than one and at most the number of parametersparameterSizes- the sizes of all parameters. [2, 3, 5] means the first parameter has 2 values, the second one 3 and the last one 5. All parameters need to have at least two values. Must not benullforbiddenTupleLists- all forbidden combinations. Must not benull. The sizes of the corresponding parameters must be respected
-
CombinatorialTestModel
public CombinatorialTestModel(int strength, int[] parameterSizes, java.util.Collection<TupleList> forbiddenTupleLists, java.util.Collection<TupleList> errorTupleLists)- Parameters:
strength- the desired testing strength. Must be equal to or greater than one and at most the number of parametersparameterSizes- the sizes of all parameters. [2, 3, 5] means the first parameter has 2 values, the second one 3 and the last one 5. All parameters need to have at least two values. Must not benullforbiddenTupleLists- all forbidden combinations. Must not benull. The sizes of the corresponding parameters must be respected. Must not contain duplicate idserrorTupleLists- all error combinations. Must not benull. The sizes of the corresponding parameters must be respected. Must not contain duplicate ids or ids contained in the forbiddenTupleLists
-
-
Method Detail
-
getStrength
public int getStrength()
- Specified by:
getStrengthin interfaceInputParameterModel- Returns:
- the testing strength
-
getParameterSizes
public int[] getParameterSizes()
- Specified by:
getParameterSizesin interfaceInputParameterModel- Returns:
- the number of values for each parameter
-
getForbiddenTupleLists
public java.util.List<TupleList> getForbiddenTupleLists()
- Returns:
- all forbidden combinations. Tests containing these combinations cannot be executed
-
getErrorTupleLists
public java.util.List<TupleList> getErrorTupleLists()
- Returns:
- all error combinations. Tests containing these combinations can be executed but should cause an error
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-