Class 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 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 parameters
        parameterSizes - 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 be null
      • 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 parameters
        parameterSizes - 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 be null
        forbiddenTupleLists - all forbidden combinations. Must not be null. 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 parameters
        parameterSizes - 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 be null
        forbiddenTupleLists - all forbidden combinations. Must not be null. The sizes of the corresponding parameters must be respected. Must not contain duplicate ids
        errorTupleLists - all error combinations. Must not be null. The sizes of the corresponding parameters must be respected. Must not contain duplicate ids or ids contained in the forbiddenTupleLists
    • Method Detail

      • 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:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object