Class TupleRelationshipStrategy

  • All Implemented Interfaces:
    IdentificationStrategy

    public class TupleRelationshipStrategy
    extends Object
    implements IdentificationStrategy
    Identification Strategy using Tuple-Relationship-Trees proposed by Nie et al. in "Identifying Failure-Inducing Combinations Using Tuple Relationship".

    This strategy implements the augmented approach without the TRT assumption. This means that there is no Safe Value Assumption. MAXIMUM_NUMBER_OF_ITERATIONS extra test inputs are generated to ensure that a selected tuple is faulty and that the failing of the test case is not caused by a new failure. The higher this value, the higher the probability that the selected tuple is really faulty.

    • Field Detail

      • currentlyProcessedTestInput

        protected int[] currentlyProcessedTestInput
    • Method Detail

      • tupleRelationshipStrategy

        public static IdentificationStrategyFactory tupleRelationshipStrategy()
        Returns:
        factory creating Tuple-Relationship-Strategy
      • 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)