public class Aifl extends SuspiciousCombinationAlgorithm
Additional test inputs are generated by mutating values in failed tests one by one. This means an additional n test inputs per failed test input (n being the number of parameters). For example, if test input (0, 1, 2, 0, 1) failed, 5 new test inputs would be generated: (-, 1, 2, 0, 1), (0, -, 1, 2, 0, 1), (0, 1, -, 0, 1), (0, 1, 2, -, 1), (0, 1, 2, 0, -). "-" stands for an arbitrary different other value.
Important Information: -Generates many additional test inputs if there are many parameters -Generates many additional test inputs if there are many failing test inputs -Does not order failure-inducing combinations by probability and can return quite a few of them -Does not consider constraints
configuration, previousSuspiciousCombinations, suspiciousCombinations, testResults| Constructor and Description |
|---|
Aifl(FaultCharacterizationConfiguration configuration)
Builds a new instance of the algorithm for a given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
static FaultCharacterizationAlgorithmFactory |
aifl()
Can be used as a convenience method to describe that AIFL should be used as a
FaultCharacterizationAlgorithmFactory. |
List<int[]> |
computeFailureInducingCombinations()
Computes a list of most likely failure inducing combinations refined
from previous calls to
FaultCharacterizationAlgorithm.computeNextTestInputs(Map). |
List<IntArrayWrapper> |
generateNextTestInputs(Map<int[],TestResult> newTestResults)
The concrete algorithm generates test for which it needs the result for better fault characterization.
|
Set<IntArrayWrapper> |
getRelevantSubCombinations(int[] combination)
Defined which sub-combinations of any given combination can be part of the suspicious set.
|
boolean |
shouldGenerateFurtherTestInputs() |
computeNextTestInputs, getChecker, getModel, getReporterpublic Aifl(FaultCharacterizationConfiguration configuration)
configuration - for knowing which combinations can be failure-inducing/which test inputs can be generated.
Must not be nullNullPointerException - if configuration is nullpublic static FaultCharacterizationAlgorithmFactory aifl()
FaultCharacterizationAlgorithmFactory.Aifl(FaultCharacterizationConfiguration)) to create new
FaultCharacterizationAlgorithm instancespublic Set<IntArrayWrapper> getRelevantSubCombinations(int[] combination)
SuspiciousCombinationAlgorithmgetRelevantSubCombinations in class SuspiciousCombinationAlgorithmcombination - for which the relevant sub-combinations are neededpublic boolean shouldGenerateFurtherTestInputs()
shouldGenerateFurtherTestInputs in class SuspiciousCombinationAlgorithmFaultCharacterizationAlgorithm.computeFailureInducingCombinations()
will be called nextpublic List<IntArrayWrapper> generateNextTestInputs(Map<int[],TestResult> newTestResults)
SuspiciousCombinationAlgorithmgenerateNextTestInputs in class SuspiciousCombinationAlgorithmnewTestResults - the results from the test inputs generated in the last iteration of the initially generated
test inputs if in the first iterationpublic List<int[]> computeFailureInducingCombinations()
FaultCharacterizationAlgorithmFaultCharacterizationAlgorithm.computeNextTestInputs(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.Copyright © 2019. All rights reserved.