Class CombinatorialTestConsumerManager
- java.lang.Object
-
- de.rwth.swc.coffee4j.model.manager.CombinatorialTestConsumerManager
-
public class CombinatorialTestConsumerManager extends java.lang.ObjectA manager for converting test inputs using aModelConverterand putting them into a provided consumer. Uses aDelegatingModelBasedArgumentConverterandDelegatingExecutionReporterandExecutionReporterToGenerationReporterAdapterto convert between different representations and allow multiple converts and reporter even though method in engine only accept one.
-
-
Constructor Summary
Constructors Constructor Description CombinatorialTestConsumerManager(CombinatorialTestConsumerManagerConfiguration configuration, java.util.function.Consumer<Combination> testInputConsumer, InputParameterModel model)Creates a new manager with the given configuration, consumer and testModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckConstraintsForConflicts()Checks for conflicts among error-constraints, converts them and reports them to System.out.voidgenerateAdditionalTestInputsWithResult(Combination testInput, de.rwth.swc.coffee4j.engine.TestResult testResult)Generates additional test inputs based on a new test result.voidgenerateInitialTests()Generates the initial test inputs, converts them and propagates them to the consumer given in the constructor.
-
-
-
Constructor Detail
-
CombinatorialTestConsumerManager
public CombinatorialTestConsumerManager(CombinatorialTestConsumerManagerConfiguration configuration, java.util.function.Consumer<Combination> testInputConsumer, InputParameterModel model)
Creates a new manager with the given configuration, consumer and testModel.- Parameters:
configuration- all needed configuration for a combinatorial test. This is the part which can be reused across different tests. Must not benulltestInputConsumer- a consumer for all test inputs generated by theCombinatorialTestManagerprovided by the configuration. Each test input is converted using aModelConvertergenerated by the providedModelConverterFactory. This part is generally not reusable. Must not benullmodel- the testModel which defines all parameters and constraints for a combinatorial test. This part is generally not reusable. Must not benull
-
-
Method Detail
-
checkConstraintsForConflicts
public boolean checkConstraintsForConflicts()
Checks for conflicts among error-constraints, converts them and reports them to System.out.- Returns:
- true if not conflicts were detected false if conflicts were detected
-
generateInitialTests
public void generateInitialTests()
Generates the initial test inputs, converts them and propagates them to the consumer given in the constructor.
-
generateAdditionalTestInputsWithResult
public void generateAdditionalTestInputsWithResult(Combination testInput, de.rwth.swc.coffee4j.engine.TestResult testResult)
Generates additional test inputs based on a new test result. All returned test inputs are converted and then propagated to the given consumer.- Parameters:
testInput- a test input. Must not benulltestResult- the result of the test input. Must not benull
-
-