Interface FaultCharacterizationAlgorithm
-
- All Known Subinterfaces:
GeneratingFaultCharacterizationAlgorithm
- All Known Implementing Classes:
Ben
,GeneratingImprovedDD
,GeneratingMixtgte
,ImprovedDeltaDebugging
,Mixtgte
,NoOp
,SuspiciousCombinationAlgorithm
public interface FaultCharacterizationAlgorithm
Describes an algorithm used to characterize failure-inducing combinations in combinatorial tests. A combination is considered failure-inducing if every test input containing it fails.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<int[]>
computeFailureInducingCombinations()
Computes a list of most likely failure inducing combinations refined from previous calls tocomputeNextTestInputs(Map)
.List<int[]>
computeNextTestInputs(Map<int[],TestResult> testResults)
Refines the internal list of suspicious of faulty combinations.
-
-
-
Method Detail
-
computeNextTestInputs
List<int[]> computeNextTestInputs(Map<int[],TestResult> testResults)
Refines the internal list of suspicious of faulty combinations. If this method is called for the first time, an initial list of suspicious combinations is created. This process may take a while. After the refinement of the list, test inputs are generated. These test inputs should be executed and this method should then be called with the results of these test inputs until no test inputs are returned. Through this process the underlying algorithm can refine and shorten it's list of suspicious combinations over time.When no combinations are returned any more,
computeFailureInducingCombinations()
can be used to compute a final list of most likely faulty combinations.- Parameters:
testResults
- the results of the initial test suite or previous test inputs generated by this method. Must not benull
or empty.- Returns:
- a list of further test inputs which need to be executed to refine the list of suspicious combinations
- Throws:
IllegalStateException
- if the algorithm has not been initializedNullPointerException
- if testResults isnull
IllegalArgumentException
- if testResults is empty
-
computeFailureInducingCombinations
List<int[]> computeFailureInducingCombinations()
Computes a list of most likely failure inducing combinations refined from previous calls tocomputeNextTestInputs(Map)
. The combinations returned by this method are not guaranteed to be faulty, but it is guaranteed that no test input executed which contained this combination was successful.- Returns:
- a list of faulty combinations. The list may be ranked, depending on the underlying algorithm. If this list is ranked the combinations on positions with smaller indices are more likely to be failure inducing
- Throws:
IllegalStateException
- if the algorithm has not been initialized
-
-