Class BasicCombinatorialTestManager
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.manager.BasicCombinatorialTestManager
-
- All Implemented Interfaces:
CombinatorialTestManager
public class BasicCombinatorialTestManager extends java.lang.Object implements CombinatorialTestManager
A very basic manager for combinatorial tests. It is basic in the sense that it does not support any form of test result caching and/or parallel generation of test input groups.
-
-
Constructor Summary
Constructors Constructor Description BasicCombinatorialTestManager(CombinatorialTestConfiguration configuration, TestModel model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MissingInvalidTuple>checkConstraintsForConflicts()java.util.List<DiagnosisHittingSet>computeMinimalDiagnosisHittingSets(java.util.List<MissingInvalidTuple> missingInvalidTuples)java.util.List<int[]>generateAdditionalTestInputsWithResult(int[] testInput, TestResult testResult)Returns all additional test inputs needed for allTestInputGroups managed by this manager.java.util.List<int[]>generateInitialTests()Generates all test input groups given by the suppliedTestInputGroupGenerators.
-
-
-
Constructor Detail
-
BasicCombinatorialTestManager
public BasicCombinatorialTestManager(CombinatorialTestConfiguration configuration, TestModel model)
-
-
Method Detail
-
checkConstraintsForConflicts
public java.util.List<MissingInvalidTuple> checkConstraintsForConflicts()
- Specified by:
checkConstraintsForConflictsin interfaceCombinatorialTestManager
-
computeMinimalDiagnosisHittingSets
public java.util.List<DiagnosisHittingSet> computeMinimalDiagnosisHittingSets(java.util.List<MissingInvalidTuple> missingInvalidTuples)
- Specified by:
computeMinimalDiagnosisHittingSetsin interfaceCombinatorialTestManager
-
generateInitialTests
public java.util.List<int[]> generateInitialTests()
Generates all test input groups given by the suppliedTestInputGroupGenerators. All test inputs are then returned. During the generation, the methodGenerationReporter.testInputGroupGenerated(TestInputGroup, TestInputGroupGenerator)is called for each generatedTestInputGroup.- Specified by:
generateInitialTestsin interfaceCombinatorialTestManager- Returns:
- all generated test inputs from all groups. They are returned in the exact order in which the
TestInputGroupGenerators returned them insideTestInputGroups.
-
generateAdditionalTestInputsWithResult
public java.util.List<int[]> generateAdditionalTestInputsWithResult(int[] testInput, TestResult testResult)Returns all additional test inputs needed for allTestInputGroups managed by this manager. For each managedTestInputGroupthe following flow is used: 1. Check if the test input is contained in either the initial set of generated test inputs (first iteration) or in the requested test inputs for fault characterization (in all other iterations) 1.1 If that is not the input, return an empty list of additionally needed test inputs 1.2 if that is the input, check whether fault characterization is enabled (factory is given, group has configuration, a test input in the initial set failed) 1.2.1 if FL is not enabled, the group is considered finished and will never return test inputs again 1.2.2 else, new test inputs are generated by the fault characterization algorithm provided by the factory and returnedWhen necessary, the method called the necessary methods on a given reporter: -
GenerationReporter.faultCharacterizationStarted(TestInputGroup, FaultCharacterizationAlgorithm)-GenerationReporter.faultCharacterizationTestInputsGenerated(TestInputGroup, List)-GenerationReporter.faultCharacterizationFinished(TestInputGroup, List)-GenerationReporter.testInputGroupFinished(TestInputGroup)- Specified by:
generateAdditionalTestInputsWithResultin interfaceCombinatorialTestManager- Parameters:
testInput- the test inputs for which's result additional test inputs shall be generatedtestResult- whether the test input was successful and if not how the failure was caused- Returns:
- a combined list of test inputs generated by the fault characterization of each test input group
-
-