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.Builder
argumentConverter(ArgumentConverter argumentConverter)
Adds the argument converter to convert report arguments from engine to testModel representations.SequentialExecutionConfiguration.Builder
argumentConverters(ArgumentConverter... argumentConverters)
Adds the argument converters to convert report arguments from engine to testModel representations.SequentialExecutionConfiguration.Builder
argumentConverters(Collection<ArgumentConverter> argumentConverters)
Adds the argument converters to convert report arguments from engine to testModel representations.SequentialExecutionConfiguration
build()
Creates a new configuration based on the supplied values.SequentialExecutionConfiguration.Builder
classificationStrategyFactory(ClassificationStrategyFactory classificationStrategyFactory)
SequentialExecutionConfiguration.Builder
conflictDetectionConfiguration(ConflictDetectionConfiguration constraintDiagnosisEnabled)
Sets theConflictDetectionConfiguration
SequentialExecutionConfiguration.Builder
executionMode(ExecutionMode executionMode)
Sets the execution mode for the sequential combinatorial test configuration.SequentialExecutionConfiguration.Builder
executionReporter(SequentialExecutionReporter executionReporter)
Adds one execution reporter to listen to important events during combinatorial test execution.SequentialExecutionConfiguration.Builder
executionReporters(SequentialExecutionReporter... executionReporters)
Adds all execution reports to listen to important events during combinatorial test execution.SequentialExecutionConfiguration.Builder
executionReporters(Collection<? extends SequentialExecutionReporter> executionReporters)
Adds all execution reporters to listen to important events during combinatorial test execution.SequentialExecutionConfiguration.Builder
faultCharacterizationAlgorithmFactory(FaultCharacterizationAlgorithmFactory characterizationAlgorithmFactory)
Sets which factory shall be used to create newFaultCharacterizationAlgorithm
instances during combinatorial testing.SequentialExecutionConfiguration.Builder
generator(TestInputGroupGenerator generator)
Adds one generator for initialTestInputGroup
generation.SequentialExecutionConfiguration.Builder
generators(TestInputGroupGenerator... generators)
Adds all generators for initialTestInputGroup
generation.SequentialExecutionConfiguration.Builder
generators(Collection<TestInputGroupGenerator> generators)
Adds all generators for initialTestInputGroup
generation.SequentialExecutionConfiguration.Builder
isConstraintGenerator(boolean flag)
Sets a flag whether the combinatorial test is used for generating parameter error-constraints.SequentialExecutionConfiguration.Builder
managerFactory(CombinatorialTestManagerFactory managerFactory)
Sets which factory shall be used to create newSequentialCombinatorialTestManager
instances.SequentialExecutionConfiguration.Builder
modelConverterFactory(ModelConverterFactory modelConverterFactory)
Sets which factory shall be used to create newModelConverter
instances.SequentialExecutionConfiguration.Builder
prioritizer(TestInputPrioritizer prioritizer)
Sets theTestInputPrioritizer
which 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 newSequentialCombinatorialTestManager
instances. The default creates new ones using aCachingDelegatingSequentialCombinatorialTestManager
with aHashMapTestResultCache
wrapped around aBasicSequentialCombinatorialTestManager
.- Parameters:
managerFactory
- the factory for creating new managers. Must not benull
whenbuild()
is called- Returns:
- this
-
modelConverterFactory
public SequentialExecutionConfiguration.Builder modelConverterFactory(ModelConverterFactory modelConverterFactory)
Sets which factory shall be used to create newModelConverter
instances. The default is aIndexBasedModelConverter
.- Parameters:
modelConverterFactory
- the factory for creating new converters. Must not benull
whenbuild()
is called- Returns:
- this
-
faultCharacterizationAlgorithmFactory
public SequentialExecutionConfiguration.Builder faultCharacterizationAlgorithmFactory(FaultCharacterizationAlgorithmFactory characterizationAlgorithmFactory)
Sets which factory shall be used to create newFaultCharacterizationAlgorithm
instances during combinatorial testing. The default value isnull
, which means no fault characterization will be used.- Parameters:
characterizationAlgorithmFactory
- the factory for creating new converters. Can benull
when 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
- theConflictDetectionConfiguration
to 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 initialTestInputGroup
generation.- Parameters:
generator
- the generator to be added. Must not benull
- Returns:
- this
-
generators
public SequentialExecutionConfiguration.Builder generators(TestInputGroupGenerator... generators)
Adds all generators for initialTestInputGroup
generation.- Parameters:
generators
- the generators to be added. Must not be, nor containnull
- Returns:
- this
-
prioritizer
public SequentialExecutionConfiguration.Builder prioritizer(TestInputPrioritizer prioritizer)
Sets theTestInputPrioritizer
which 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 initialTestInputGroup
generation.- 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-null
default values defined at the methods.- Specified by:
build
in interfaceBuildable<SequentialExecutionConfiguration>
- Returns:
- the new configuration
-
-