Class CachingDelegatingCombinatorialTestManager
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.manager.CachingDelegatingCombinatorialTestManager
-
- All Implemented Interfaces:
CombinatorialTestManager
public class CachingDelegatingCombinatorialTestManager extends java.lang.Object implements CombinatorialTestManager
ACombinatorialTestManagerwhich does not generate test inputs by itself but delegates this to another manager. However, it does add caching capability to any given manager. This means no test input is returned twice across all two methods. For example, if the initial test input [0, 0, 0] has been returned, it will not be returned again for fault characterization. Instead the cached result is used. With an appropriate cache, results can even be shared over multiple runs if that should ever be desirable.
-
-
Constructor Summary
Constructors Constructor Description CachingDelegatingCombinatorialTestManager(TestResultCache cache, CombinatorialTestManager generator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<int[]>generateAdditionalTestInputsWithResult(int[] testInput, TestResult testResult)Generates additional test inputs based on results of previous test inputs normally generated by eitherCombinatorialTestManager.generateInitialTests()or this method in a previous iteration.java.util.List<int[]>generateInitialTests()Generates all initial test inputs for execution.
-
-
-
Constructor Detail
-
CachingDelegatingCombinatorialTestManager
public CachingDelegatingCombinatorialTestManager(TestResultCache cache, CombinatorialTestManager generator)
-
-
Method Detail
-
generateInitialTests
public java.util.List<int[]> generateInitialTests()
Description copied from interface:CombinatorialTestManagerGenerates all initial test inputs for execution. This should generate at least one test input if dynamic generation viaCombinatorialTestManager.generateAdditionalTestInputsWithResult(int[], TestResult)should be used, as most front-ends won't callCombinatorialTestManager.generateAdditionalTestInputsWithResult(int[], TestResult)if this returned no test input.- Specified by:
generateInitialTestsin interfaceCombinatorialTestManager- Returns:
- a list of all initial test inputs. It is not guaranteed that these test inputs don't contain duplicates
-
generateAdditionalTestInputsWithResult
public java.util.List<int[]> generateAdditionalTestInputsWithResult(int[] testInput, TestResult testResult)Description copied from interface:CombinatorialTestManagerGenerates additional test inputs based on results of previous test inputs normally generated by eitherCombinatorialTestManager.generateInitialTests()or this method in a previous iteration. For example, this functionality can be used to implement dynamic test input generation or fault characterization (or a combination of both).- Specified by:
generateAdditionalTestInputsWithResultin interfaceCombinatorialTestManager- Parameters:
testInput- the test input for which's result further test inputs should be generatedtestResult- the result of the test input- Returns:
- a list of additional test inputs generated based on the result of the given test inputs. This does not necessarily have to return any test inputs for each call
-
-