Class OfotStrategy
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.interleaving.identification.ofot.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 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()
static IdentificationStrategyFactory
ofotStrategy()
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()
-
-
-
Method Detail
-
ofotStrategy
public static IdentificationStrategyFactory ofotStrategy()
- Returns:
- Factory creating OFOT-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
-
-