Class InputParameterModel


  • public final class InputParameterModel
    extends java.lang.Object
    An representation of a input parameter model for combinatorial testing. Consists of a testing strength, readable name for identification, parameter, and forbidden and error constraints. This model defines all important aspects of one combinatorial test.
    • Constructor Detail

      • InputParameterModel

        public InputParameterModel​(int strength,
                                   java.lang.String name,
                                   java.util.List<Parameter> parameters)
        Creates a new model with no constraints.
        Parameters:
        strength - the testing strength. Must be equal to or greater than one and at most the number of parameters
        name - the name of the model. Should be human readable. Must not be null
        parameters - all parameters of the model. Must not be, nor contain null and must not be empty. Must not contain parameters with duplicate names
      • InputParameterModel

        public InputParameterModel​(int strength,
                                   java.lang.String name,
                                   java.util.List<Parameter> parameters,
                                   java.util.Collection<Constraint> exclusionConstraints,
                                   java.util.Collection<Constraint> errorConstraints)
        Creates a new model with all given configuration arguments.
        Parameters:
        strength - the testing strength. Must be equal to or greater than one and at most the number of parameters
        name - the name of the model. Should be human readable. Must not be null
        parameters - all parameters of the model. Must not be, nor contain null and must not be empty.
        exclusionConstraints - all constraints which may never be violated as test inputs won't work then May not be, nor contain null
        errorConstraints - all constraints which may be violated but will cause the system to throw an exception. * All in all describes input which should not be allowed. May not be, nor contain null
    • Method Detail

      • getStrength

        public int getStrength()
        Returns:
        the testing strength
      • getName

        public java.lang.String getName()
        Returns:
        the descriptive name of the model
      • getParameters

        public java.util.List<Parameter> getParameters()
        Returns:
        a copy of the list of all parameters of this model
      • getExclusionConstraints

        public java.util.List<Constraint> getExclusionConstraints()
        Returns:
        a copy of the list of all forbidden constraints. Test inputs may never violate those constraints as they define combinations which are not possible testable (like testing safari on windows is not possible)
      • getErrorConstraints

        public java.util.List<Constraint> getErrorConstraints()
        Returns:
        a copy of the list of all error constraints. Test inputs may violate these constraints but they define inputs on which the system under test should react in a destructive way like raising exception (like trying to parse "asfd" as a number)
      • size

        public int size()
        Returns:
        the number of parameters
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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