Class SequentialExecutionConfiguration.Builder
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.configuration.execution.SequentialExecutionConfiguration.Builder
-
- All Implemented Interfaces:
Buildable<SequentialExecutionConfiguration>
- Enclosing class:
- SequentialExecutionConfiguration
public static final class SequentialExecutionConfiguration.Builder extends Object implements Buildable<SequentialExecutionConfiguration>
The realization of the builder pattern for a quick and readable construction of a new configuration.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequentialExecutionConfiguration.BuilderargumentConverter(ArgumentConverter argumentConverter)Adds the argument converter to convert report arguments from engine to testModel representations.SequentialExecutionConfiguration.BuilderargumentConverters(ArgumentConverter... argumentConverters)Adds the argument converters to convert report arguments from engine to testModel representations.SequentialExecutionConfiguration.BuilderargumentConverters(Collection<ArgumentConverter> argumentConverters)Adds the argument converters to convert report arguments from engine to testModel representations.SequentialExecutionConfigurationbuild()Creates a new configuration based on the supplied values.SequentialExecutionConfiguration.BuilderclassificationStrategyFactory(ClassificationStrategyFactory classificationStrategyFactory)SequentialExecutionConfiguration.BuilderconflictDetectionConfiguration(ConflictDetectionConfiguration constraintDiagnosisEnabled)Sets theConflictDetectionConfigurationSequentialExecutionConfiguration.BuilderexecutionMode(ExecutionMode executionMode)Sets the execution mode for the sequential combinatorial test configuration.SequentialExecutionConfiguration.BuilderexecutionReporter(SequentialExecutionReporter executionReporter)Adds one execution reporter to listen to important events during combinatorial test execution.SequentialExecutionConfiguration.BuilderexecutionReporters(SequentialExecutionReporter... executionReporters)Adds all execution reports to listen to important events during combinatorial test execution.SequentialExecutionConfiguration.BuilderexecutionReporters(Collection<? extends SequentialExecutionReporter> executionReporters)Adds all execution reporters to listen to important events during combinatorial test execution.SequentialExecutionConfiguration.BuilderfaultCharacterizationAlgorithmFactory(FaultCharacterizationAlgorithmFactory characterizationAlgorithmFactory)Sets which factory shall be used to create newFaultCharacterizationAlgorithminstances during combinatorial testing.SequentialExecutionConfiguration.Buildergenerator(TestInputGroupGenerator generator)Adds one generator for initialTestInputGroupgeneration.SequentialExecutionConfiguration.Buildergenerators(TestInputGroupGenerator... generators)Adds all generators for initialTestInputGroupgeneration.SequentialExecutionConfiguration.Buildergenerators(Collection<TestInputGroupGenerator> generators)Adds all generators for initialTestInputGroupgeneration.SequentialExecutionConfiguration.BuilderisConstraintGenerator(boolean flag)Sets a flag whether the combinatorial test is used for generating parameter error-constraints.SequentialExecutionConfiguration.BuildermanagerFactory(CombinatorialTestManagerFactory managerFactory)Sets which factory shall be used to create newSequentialCombinatorialTestManagerinstances.SequentialExecutionConfiguration.BuildermodelConverterFactory(ModelConverterFactory modelConverterFactory)Sets which factory shall be used to create newModelConverterinstances.SequentialExecutionConfiguration.Builderprioritizer(TestInputPrioritizer prioritizer)Sets theTestInputPrioritizerwhich shall be used to prioritize the inputs of the individualTestInputGroups.
-
-
-
Method Detail
-
managerFactory
public SequentialExecutionConfiguration.Builder managerFactory(CombinatorialTestManagerFactory managerFactory)
Sets which factory shall be used to create newSequentialCombinatorialTestManagerinstances. The default creates new ones using aCachingDelegatingSequentialCombinatorialTestManagerwith aHashMapTestResultCachewrapped around aBasicSequentialCombinatorialTestManager.- Parameters:
managerFactory- the factory for creating new managers. Must not benullwhenbuild()is called- Returns:
- this
-
modelConverterFactory
public SequentialExecutionConfiguration.Builder modelConverterFactory(ModelConverterFactory modelConverterFactory)
Sets which factory shall be used to create newModelConverterinstances. The default is aIndexBasedModelConverter.- Parameters:
modelConverterFactory- the factory for creating new converters. Must not benullwhenbuild()is called- Returns:
- this
-
faultCharacterizationAlgorithmFactory
public SequentialExecutionConfiguration.Builder faultCharacterizationAlgorithmFactory(FaultCharacterizationAlgorithmFactory characterizationAlgorithmFactory)
Sets which factory shall be used to create newFaultCharacterizationAlgorithminstances during combinatorial testing. The default value isnull, which means no fault characterization will be used.- Parameters:
characterizationAlgorithmFactory- the factory for creating new converters. Can benullwhen callingbuild()to indicate that no fault characterization is used- Returns:
- this
-
classificationStrategyFactory
public SequentialExecutionConfiguration.Builder classificationStrategyFactory(ClassificationStrategyFactory classificationStrategyFactory)
-
conflictDetectionConfiguration
public SequentialExecutionConfiguration.Builder conflictDetectionConfiguration(ConflictDetectionConfiguration constraintDiagnosisEnabled)
Sets theConflictDetectionConfiguration- Parameters:
constraintDiagnosisEnabled- theConflictDetectionConfigurationto use- Returns:
- this
SequentialExecutionConfiguration.Builder
-
executionReporter
public SequentialExecutionConfiguration.Builder executionReporter(SequentialExecutionReporter executionReporter)
Adds one execution reporter to listen to important events during combinatorial test execution.- Parameters:
executionReporter- the reporter to be added. Must not benull- Returns:
- this
-
executionReporters
public SequentialExecutionConfiguration.Builder executionReporters(SequentialExecutionReporter... executionReporters)
Adds all execution reports to listen to important events during combinatorial test execution.- Parameters:
executionReporters- the reporters to be added. Must not be, nor containnull- Returns:
- this
-
executionReporters
public SequentialExecutionConfiguration.Builder executionReporters(Collection<? extends SequentialExecutionReporter> executionReporters)
Adds all execution reporters to listen to important events during combinatorial test execution.- Parameters:
executionReporters- the reporters to be added. Must not be, nor containnull- Returns:
- this
-
argumentConverter
public SequentialExecutionConfiguration.Builder argumentConverter(ArgumentConverter argumentConverter)
Adds the argument converter to convert report arguments from engine to testModel representations.- Parameters:
argumentConverter- the converter to be added. Must not benull- Returns:
- this
-
argumentConverters
public SequentialExecutionConfiguration.Builder argumentConverters(ArgumentConverter... argumentConverters)
Adds the argument converters to convert report arguments from engine to testModel representations.- Parameters:
argumentConverters- the converters to be added. Must not be, nor containnull- Returns:
- this
-
argumentConverters
public SequentialExecutionConfiguration.Builder argumentConverters(Collection<ArgumentConverter> argumentConverters)
Adds the argument converters to convert report arguments from engine to testModel representations.- Parameters:
argumentConverters- the converters to be added. Must not be, nor containnull- Returns:
- this
-
generator
public SequentialExecutionConfiguration.Builder generator(TestInputGroupGenerator generator)
Adds one generator for initialTestInputGroupgeneration.- Parameters:
generator- the generator to be added. Must not benull- Returns:
- this
-
generators
public SequentialExecutionConfiguration.Builder generators(TestInputGroupGenerator... generators)
Adds all generators for initialTestInputGroupgeneration.- Parameters:
generators- the generators to be added. Must not be, nor containnull- Returns:
- this
-
prioritizer
public SequentialExecutionConfiguration.Builder prioritizer(TestInputPrioritizer prioritizer)
Sets theTestInputPrioritizerwhich shall be used to prioritize the inputs of the individualTestInputGroups. The default isNoOpTestInputPrioritizer.- Parameters:
prioritizer- the prioritizer to use. Must not benull- Returns:
- this
-
generators
public SequentialExecutionConfiguration.Builder generators(Collection<TestInputGroupGenerator> generators)
Adds all generators for initialTestInputGroupgeneration.- Parameters:
generators- the generators to be added. Must not be, nor containnull- Returns:
- this
-
executionMode
public SequentialExecutionConfiguration.Builder executionMode(ExecutionMode executionMode)
Sets the execution mode for the sequential combinatorial test configuration.- Parameters:
executionMode- the mode to use. The default isExecutionMode.EXECUTE_ALL. Must not benull- Returns:
- this
-
isConstraintGenerator
public SequentialExecutionConfiguration.Builder isConstraintGenerator(boolean flag)
Sets a flag whether the combinatorial test is used for generating parameter error-constraints.- Parameters:
flag- true iff test is used for generating error-constraints- Returns:
- this
-
build
public SequentialExecutionConfiguration build()
Creates a new configuration based on the supplied values. ThemanagerFactory(CombinatorialTestManagerFactory)andmodelConverterFactory(ModelConverterFactory)must not benull. If they are not used, they will have the non-nulldefault values defined at the methods.- Specified by:
buildin interfaceBuildable<SequentialExecutionConfiguration>- Returns:
- the new configuration
-
-