Class OfotStrategy

  • All Implemented Interfaces:
    IdentificationStrategy

    public class OfotStrategy
    extends Object
    implements IdentificationStrategy
    OFOT-Identification-Strategy described in "The minimal failure-causing schema of combinatorial testing" When a failing test input is detected, it generates numberOfParameters new test inputs changing exactly one parameter value per new test input. All changed parameters that make the corresponding test passing are part of the (possibly) minimal failure inducing combination. Problems occur when a test input contains multiple faults.
    • Method Detail

      • startIdentification

        public Optional<int[]> startIdentification​(int[] testInput,
                                                   TestResult result)
        Specified by:
        startIdentification in interface IdentificationStrategy
        Parameters:
        testInput - test input to start the identification of exception/failure-inducing combinations for
        result - TestResult of the failing test case containing information needed to decide whether it is failure- or exception-inducing
        Returns:
        first test input used for identification of exception/failure-inducing combinations (if present, otherwise empty Optional)
      • restartIdentification

        public Optional<int[]> restartIdentification()
        Description copied from interface: IdentificationStrategy
        restart the identification for a previously given failing test input if checking phase failed for given exception/failure-inducing combinations of previous iteration
        Specified by:
        restartIdentification in interface IdentificationStrategy
        Returns:
        first test input used for identification of exception/failure-inducing combinations (if present, otherwise empty Optional)
      • generateNextTestInputForIdentification

        public Optional<int[]> generateNextTestInputForIdentification​(int[] testInput,
                                                                      TestResult testResult)
        Specified by:
        generateNextTestInputForIdentification in interface IdentificationStrategy
        Parameters:
        testInput - previously executed test input
        testResult - result of previously executed test input
        Returns:
        next test input used for identification of exception/failure-inducing combinations (empty Optional, if exception/failure-inducing combinations identified)