Class DelegatingSequentialExecutionReporter
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.report.DelegatingSequentialExecutionReporter
-
- All Implemented Interfaces:
ExecutionReporter
,SequentialExecutionReporter
public class DelegatingSequentialExecutionReporter extends Object implements SequentialExecutionReporter
-
-
Constructor Summary
Constructors Constructor Description DelegatingSequentialExecutionReporter(Collection<SequentialExecutionReporter> executionReporters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
faultCharacterizationFinished(TestInputGroupContext context, Map<Combination,Class<? extends Throwable>> exceptionInducingCombinations, Collection<Combination> possiblyFailureInducingCombinations)
Called if fault characterization for aTestInputGroup
is completely finished.void
faultCharacterizationStarted(TestInputGroupContext context, FaultCharacterizationAlgorithm algorithm)
Called if a fault characterization started for aTestInputGroup
.void
faultCharacterizationTestInputsGenerated(TestInputGroupContext context, List<Combination> testInputs)
Called if additional test inputs for the fault characterization process of oneTestInputGroup
have been generated by the algorithm given toSequentialExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm)
.ReportLevel
getReportLevel()
Specifies the level of reports this reporter wants to get.void
modelModified(InputParameterModel original, InputParameterModel modified)
Called if anyModelModifier
changed the model.void
report(ReportLevel level, Report report)
Called if any algorithm made a report for and event not covered by any of the life cycle callback methods.void
testInputExecutionFinished(Combination testInput, TestResult result)
Indicates the end of a test input execution.void
testInputExecutionStarted(Combination testInput)
Indicates the start of a test input execution.void
testInputGroupFinished(TestInputGroupContext context)
Called if aTestInputGroup
has completely finished.void
testInputGroupGenerated(TestInputGroupContext context, List<Combination> testInputs)
Called if a newTestInputGroup
has been generated by aTestInputGroupGenerator
.
-
-
-
Constructor Detail
-
DelegatingSequentialExecutionReporter
public DelegatingSequentialExecutionReporter(Collection<SequentialExecutionReporter> executionReporters)
-
-
Method Detail
-
getReportLevel
public ReportLevel getReportLevel()
Description copied from interface:ExecutionReporter
Specifies the level of reports this reporter wants to get. Only reports with an equal of higherReportLevel
will be passed toExecutionReporter.report(ReportLevel, Report)
.- Specified by:
getReportLevel
in interfaceExecutionReporter
- Returns:
- the desired level of reports. The default method returns trace
-
testInputGroupGenerated
public void testInputGroupGenerated(TestInputGroupContext context, List<Combination> testInputs)
Description copied from interface:SequentialExecutionReporter
Called if a newTestInputGroup
has been generated by aTestInputGroupGenerator
. The generator is given inside theTestInputGroupContext
.- Specified by:
testInputGroupGenerated
in interfaceSequentialExecutionReporter
- Parameters:
context
- all important information about one grouptestInputs
- the initially generated test inputs
-
testInputGroupFinished
public void testInputGroupFinished(TestInputGroupContext context)
Description copied from interface:SequentialExecutionReporter
Called if aTestInputGroup
has completely finished. This means fault characterization is finished (if it was enabled), and no more methods in this class will be called in reference to this context.- Specified by:
testInputGroupFinished
in interfaceSequentialExecutionReporter
- Parameters:
context
- the context of the group which was finished
-
faultCharacterizationStarted
public void faultCharacterizationStarted(TestInputGroupContext context, FaultCharacterizationAlgorithm algorithm)
Description copied from interface:SequentialExecutionReporter
Called if a fault characterization started for aTestInputGroup
. The process will end again whenSequentialExecutionReporter.faultCharacterizationFinished(TestInputGroupContext, Map, Collection)
is called.- Specified by:
faultCharacterizationStarted
in interfaceSequentialExecutionReporter
- Parameters:
context
- the context of the group for which fault characterization startedalgorithm
- the algorithm which will be used to characterize faults. This is a reference to the real algorithm. Do not modify as this will most likely have unintended side effects
-
faultCharacterizationFinished
public void faultCharacterizationFinished(TestInputGroupContext context, Map<Combination,Class<? extends Throwable>> exceptionInducingCombinations, Collection<Combination> possiblyFailureInducingCombinations)
Description copied from interface:SequentialExecutionReporter
Called if fault characterization for aTestInputGroup
is completely finished. This meansSequentialExecutionReporter.faultCharacterizationTestInputsGenerated(TestInputGroupContext, List)
will never be called again for this context, and soon after this methodSequentialExecutionReporter.testInputGroupFinished(TestInputGroupContext)
is called.- Specified by:
faultCharacterizationFinished
in interfaceSequentialExecutionReporter
- Parameters:
context
- the context of the group for which fault characterization finishedexceptionInducingCombinations
- all found exception-inducing combinationspossiblyFailureInducingCombinations
- all possibly failure-inducing combinations found. The order may or may not be based on an algorithm internal probability metric of the combinations being failure-inducing
-
faultCharacterizationTestInputsGenerated
public void faultCharacterizationTestInputsGenerated(TestInputGroupContext context, List<Combination> testInputs)
Description copied from interface:SequentialExecutionReporter
Called if additional test inputs for the fault characterization process of oneTestInputGroup
have been generated by the algorithm given toSequentialExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm)
. This method can only be called (multiple times) between calls toSequentialExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm)
andSequentialExecutionReporter.faultCharacterizationFinished(TestInputGroupContext, Map, Collection)
.- Specified by:
faultCharacterizationTestInputsGenerated
in interfaceSequentialExecutionReporter
- Parameters:
context
- the context of the group for which additional test inputs were generatedtestInputs
- all additionally generated test inputs
-
testInputExecutionStarted
public void testInputExecutionStarted(Combination testInput)
Description copied from interface:ExecutionReporter
Indicates the start of a test input execution.- Specified by:
testInputExecutionStarted
in interfaceExecutionReporter
- Parameters:
testInput
- the started test input
-
testInputExecutionFinished
public void testInputExecutionFinished(Combination testInput, TestResult result)
Description copied from interface:ExecutionReporter
Indicates the end of a test input execution.- Specified by:
testInputExecutionFinished
in interfaceExecutionReporter
- Parameters:
testInput
- the finished test inputresult
- the result of the test input
-
report
public void report(ReportLevel level, Report report)
Description copied from interface:ExecutionReporter
Called if any algorithm made a report for and event not covered by any of the life cycle callback methods.- Specified by:
report
in interfaceExecutionReporter
- Parameters:
level
- the level of the report. Always higher than or equal toExecutionReporter.getReportLevel()
report
- the actual report with resolved arguments
-
modelModified
public void modelModified(InputParameterModel original, InputParameterModel modified)
Description copied from interface:ExecutionReporter
Called if anyModelModifier
changed the model.- Specified by:
modelModified
in interfaceExecutionReporter
- Parameters:
original
- the model before modificationmodified
- the model after modification. May benull
if theModelModifier
returnednull
-
-