Class BasicSequentialCombinatorialTestManager
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.sequential.manager.BasicSequentialCombinatorialTestManager
-
- All Implemented Interfaces:
SequentialCombinatorialTestManager
public class BasicSequentialCombinatorialTestManager extends Object implements SequentialCombinatorialTestManager
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 BasicSequentialCombinatorialTestManager(SequentialCombinatorialTestConfiguration configuration, CompleteTestModel model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<int[]>
generateAdditionalTestInputsWithResult(int[] testInput, TestResult testResult)
Returns all additional test inputs needed for allTestInputGroup
s managed by this manager.List<int[]>
generateInitialTests()
Generates all test input groups given by the suppliedTestInputGroupGenerator
s.
-
-
-
Constructor Detail
-
BasicSequentialCombinatorialTestManager
public BasicSequentialCombinatorialTestManager(SequentialCombinatorialTestConfiguration configuration, CompleteTestModel model)
-
-
Method Detail
-
generateInitialTests
public List<int[]> generateInitialTests()
Generates all test input groups given by the suppliedTestInputGroupGenerator
s. All test inputs are then returned. During the generation, the methodGenerationReporter.testInputGroupGenerated(TestInputGroup, TestInputGroupGenerator)
is called for each generatedTestInputGroup
.- Specified by:
generateInitialTests
in interfaceSequentialCombinatorialTestManager
- Returns:
- all generated test inputs from all groups. They are returned in the exact order in which the
TestInputGroupGenerator
s returned them insideTestInputGroup
s.
-
generateAdditionalTestInputsWithResult
public List<int[]> generateAdditionalTestInputsWithResult(int[] testInput, TestResult testResult)
Returns all additional test inputs needed for allTestInputGroup
s managed by this manager. For each managedTestInputGroup
the 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, Map, Set)
-GenerationReporter.testInputGroupFinished(TestInputGroup)
- Specified by:
generateAdditionalTestInputsWithResult
in interfaceSequentialCombinatorialTestManager
- 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
-
-