Class TupleRelationshipStrategy
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.interleaving.identification.trt.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 Summary
Fields Modifier and Type Field Description protected int[]
currentlyProcessedTestInput
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<int[]>
generateNextTestInputForIdentification(int[] testInput, TestResult testResult)
Map<it.unimi.dsi.fastutil.ints.IntList,CombinationType>
getIdentifiedCombinations()
Optional<int[]>
restartIdentification()
restart the identification for a previously given failing test input if checking phase failed for given exception/failure-inducing combinations of previous iterationOptional<int[]>
startIdentification(int[] testInput, TestResult result)
String
toString()
static IdentificationStrategyFactory
tupleRelationshipStrategy()
-
-
-
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 interfaceIdentificationStrategy
- Parameters:
testInput
- test input to start the identification of exception/failure-inducing combinations forresult
-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 interfaceIdentificationStrategy
- 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 interfaceIdentificationStrategy
- Parameters:
testInput
- previously executed test inputtestResult
- 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)
-
getIdentifiedCombinations
public Map<it.unimi.dsi.fastutil.ints.IntList,CombinationType> getIdentifiedCombinations()
- Specified by:
getIdentifiedCombinations
in interfaceIdentificationStrategy
- Returns:
- identified combinations together with their type -- exception- or failure-inducing
-
-