Class AbstractInterleavingPhaseManager
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.process.interleaving.AbstractInterleavingPhaseManager
-
- All Implemented Interfaces:
PhaseManager
- Direct Known Subclasses:
DefaultGeneratingInterleavingPhaseManager
,DefaultTestingInterleavingPhaseManager
public abstract class AbstractInterleavingPhaseManager extends Object implements PhaseManager
Abstract class implementing thePhaseManager
Interface for Interleaving CT. It provides general functionality and fields used by all sub-classes.Manages a
ResultCache
to execute every test input exactly once. If a test input has been executed before, thePhaseManager
loads the result from the cache instead of executing theExecutionPhase
.
-
-
Field Summary
Fields Modifier and Type Field Description protected ResultCache
cache
protected CheckingPhase
checkingPhase
protected InterleavingPhaseManagerConfiguration
configuration
protected ExecutionContext
executionContext
protected ExecutionPhase
executionPhase
protected ExtensionExecutor
extensionExecutor
protected InterleavingGenerationContext
generationContext
protected InterleavingGenerationPhase
generationPhase
protected IdentificationPhase
identificationPhase
-
Constructor Summary
Constructors Constructor Description AbstractInterleavingPhaseManager(InterleavingPhaseManagerConfiguration configuration)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
createPhases()
protected abstract void
executeClassificationPhase(Map<Combination,TestResult> errorConstraintExceptionCausingTestInputs)
Template method implemented by error-constraint generating managers.void
run()
Runs the automation of the phases defined in the managerprotected Map<Combination,TestResult>
runTestInput(Combination nextTestInput)
passes test input to execution phase if result is not present in cache.
-
-
-
Field Detail
-
cache
protected final ResultCache cache
-
configuration
protected InterleavingPhaseManagerConfiguration configuration
-
executionContext
protected ExecutionContext executionContext
-
generationContext
protected InterleavingGenerationContext generationContext
-
extensionExecutor
protected ExtensionExecutor extensionExecutor
-
executionPhase
protected ExecutionPhase executionPhase
-
generationPhase
protected InterleavingGenerationPhase generationPhase
-
identificationPhase
protected IdentificationPhase identificationPhase
-
checkingPhase
protected CheckingPhase checkingPhase
-
-
Constructor Detail
-
AbstractInterleavingPhaseManager
public AbstractInterleavingPhaseManager(InterleavingPhaseManagerConfiguration configuration)
-
-
Method Detail
-
run
public void run()
Description copied from interface:PhaseManager
Runs the automation of the phases defined in the manager- Specified by:
run
in interfacePhaseManager
-
createPhases
protected void createPhases()
-
executeClassificationPhase
protected abstract void executeClassificationPhase(Map<Combination,TestResult> errorConstraintExceptionCausingTestInputs)
Template method implemented by error-constraint generating managers.- Parameters:
errorConstraintExceptionCausingTestInputs
- map containing all executedCombination
s and the correspondingTestResult
s causing an exceptional-pass.
-
runTestInput
protected Map<Combination,TestResult> runTestInput(Combination nextTestInput)
passes test input to execution phase if result is not present in cache.- Parameters:
nextTestInput
- test input to obtain result for.- Returns:
- executed test input with corresponding execution result.
-
-