Interface ExecutionReporter
-
- All Known Implementing Classes:
NoExecutionReporter,PrintStreamExecutionReporter
public interface ExecutionReporterTheInputParameterModel-based equivalent to aGenerationReporter. Instead ofTestInputGroups this usesTestInputGroupContexts so that identifies can be converted usingArgumentConverters. Additionally, this means that all test inputs are converted into a sensible format (Combination).The method in this class can be split into three categories. The first one deals with all lifecycle events from
TestInputGroupContexts. The second one with actual execution of test inputs, and the third one with event reporting capabilities. Actual test execution reporting is not done perTestInputGroupContext, as caching results in some tests getting executed for multipleTestInputGroupContexts.All methods have empty default implementations so that each implementing class can choose what methods to override.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidfaultCharacterizationFinished(TestInputGroupContext context, java.util.List<Combination> failureInducingCombinations)Called if fault characterization for aTestInputGroupis completely finished.default voidfaultCharacterizationStarted(TestInputGroupContext context, de.rwth.swc.coffee4j.engine.characterization.FaultCharacterizationAlgorithm algorithm)Called if a fault characterization started for aTestInputGroup.default voidfaultCharacterizationTestInputsGenerated(TestInputGroupContext context, java.util.List<Combination> testInputs)Called if additional test inputs for the fault characterization process of oneTestInputGrouphave been generated by the algorithm given tofaultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm).default de.rwth.swc.coffee4j.engine.report.ReportLevelgetReportLevel()Specifies the level of reports this reporter wants to get.default voidreport(de.rwth.swc.coffee4j.engine.report.ReportLevel level, de.rwth.swc.coffee4j.engine.report.Report report)Called if any algorithm made a report for and event not covered by any of the life cycle callback methods.default voidtestInputExecutionFinished(Combination testInput, de.rwth.swc.coffee4j.engine.TestResult result)Indicates the end of a test input execution.default voidtestInputExecutionStarted(Combination testInput)Indicates the start of a test input execution.default voidtestInputGroupFinished(TestInputGroupContext context)Called if aTestInputGrouphas completely finished.default voidtestInputGroupGenerated(TestInputGroupContext context, java.util.List<Combination> testInputs)Called if a newTestInputGrouphas been generated by aTestInputGroupGenerator.
-
-
-
Method Detail
-
testInputGroupGenerated
default void testInputGroupGenerated(TestInputGroupContext context, java.util.List<Combination> testInputs)
Called if a newTestInputGrouphas been generated by aTestInputGroupGenerator. The generator is given inside theTestInputGroupContext.- Parameters:
context- all important information about one grouptestInputs- the initially generated test inputs
-
testInputGroupFinished
default void testInputGroupFinished(TestInputGroupContext context)
Called if aTestInputGrouphas 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.- Parameters:
context- the context of the group which was finished
-
faultCharacterizationStarted
default void faultCharacterizationStarted(TestInputGroupContext context, de.rwth.swc.coffee4j.engine.characterization.FaultCharacterizationAlgorithm algorithm)
Called if a fault characterization started for aTestInputGroup. The process will end again whenfaultCharacterizationFinished(TestInputGroupContext, List)is called.- 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
default void faultCharacterizationFinished(TestInputGroupContext context, java.util.List<Combination> failureInducingCombinations)
Called if fault characterization for aTestInputGroupis completely finished. This meansfaultCharacterizationTestInputsGenerated(TestInputGroupContext, List)will never be called again for this context, and soon after this methodtestInputGroupFinished(TestInputGroupContext)is called.- Parameters:
context- the context of the group for which fault characterization finishedfailureInducingCombinations- all 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
default void faultCharacterizationTestInputsGenerated(TestInputGroupContext context, java.util.List<Combination> testInputs)
Called if additional test inputs for the fault characterization process of oneTestInputGrouphave been generated by the algorithm given tofaultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm). This method can only be called (multiple times) between calls tofaultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm)andfaultCharacterizationFinished(TestInputGroupContext, List).- Parameters:
context- the context of the group for which additional test inputs were generatedtestInputs- all additionally generated test inputs
-
testInputExecutionStarted
default void testInputExecutionStarted(Combination testInput)
Indicates the start of a test input execution.- Parameters:
testInput- the started test input
-
testInputExecutionFinished
default void testInputExecutionFinished(Combination testInput, de.rwth.swc.coffee4j.engine.TestResult result)
Indicates the end of a test input execution.- Parameters:
testInput- the finished test inputresult- the result of the test input
-
getReportLevel
default de.rwth.swc.coffee4j.engine.report.ReportLevel getReportLevel()
Specifies the level of reports this reporter wants to get. Only reports with an equal of higherReportLevelwill be passed toreport(ReportLevel, Report).- Returns:
- the desired level of reports. The default method returns trace
-
report
default void report(de.rwth.swc.coffee4j.engine.report.ReportLevel level, de.rwth.swc.coffee4j.engine.report.Report report)Called if any algorithm made a report for and event not covered by any of the life cycle callback methods.- Parameters:
level- the level of the report. Always higher than or equal togetReportLevel()report- the actual report with resolved arguments
-
-