Class LoggingSequentialExecutionReporter
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.process.report.sequential.LoggingSequentialExecutionReporter
-
- All Implemented Interfaces:
ExecutionReporter,SequentialExecutionReporter
- Direct Known Subclasses:
LoggingSequentialExecutionReporterForGeneration
public class LoggingSequentialExecutionReporter extends Object implements SequentialExecutionReporter
ASequentialExecutionReporterthat reports the occurring events using aLogger
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description LoggingSequentialExecutionReporter()Creates a newLoggingSequentialExecutionReporterusing a logger corresponding to this classLoggingSequentialExecutionReporter(org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfaultCharacterizationFinished(TestInputGroupContext context, Map<Combination,Class<? extends Throwable>> exceptionInducingCombinations, Collection<Combination> failureInducingCombinations)Called if fault characterization for aTestInputGroupis completely finished.voidfaultCharacterizationStarted(TestInputGroupContext context, FaultCharacterizationAlgorithm algorithm)Called if a fault characterization started for aTestInputGroup.voidfaultCharacterizationTestInputsGenerated(TestInputGroupContext context, List<Combination> testInputs)Called if additional test inputs for the fault characterization process of oneTestInputGrouphave been generated by the algorithm given toSequentialExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm).protected voidprintExceptionInducingCombinations(Map<Combination,Class<? extends Throwable>> exceptionInducingCombinations)template method implemented by sub-classes reporting found exception-inducing combinationsprotected voidprintWarning(Collection<Combination> failureInducingCombinations)template method implemented by sub-classes reporting found exception-inducing combinationsvoidreport(ReportLevel level, Report report)Called if any algorithm made a report for and event not covered by any of the life cycle callback methods.voidtestInputExecutionFinished(Combination testInput, TestResult result)Indicates the end of a test input execution.voidtestInputExecutionStarted(Combination testInput)Indicates the start of a test input execution.voidtestInputGroupFinished(TestInputGroupContext context)Called if aTestInputGrouphas completely finished.voidtestInputGroupGenerated(TestInputGroupContext context, List<Combination> testInputs)Called if a newTestInputGrouphas been generated by aTestInputGroupGenerator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.rwth.swc.coffee4j.engine.report.ExecutionReporter
getReportLevel, modelModified
-
-
-
-
Constructor Detail
-
LoggingSequentialExecutionReporter
public LoggingSequentialExecutionReporter()
Creates a newLoggingSequentialExecutionReporterusing a logger corresponding to this class
-
LoggingSequentialExecutionReporter
public LoggingSequentialExecutionReporter(org.slf4j.Logger logger)
-
-
Method Detail
-
testInputGroupGenerated
public void testInputGroupGenerated(TestInputGroupContext context, List<Combination> testInputs)
Description copied from interface:SequentialExecutionReporterCalled if a newTestInputGrouphas been generated by aTestInputGroupGenerator. The generator is given inside theTestInputGroupContext.- Specified by:
testInputGroupGeneratedin interfaceSequentialExecutionReporter- Parameters:
context- all important information about one grouptestInputs- the initially generated test inputs
-
testInputGroupFinished
public void testInputGroupFinished(TestInputGroupContext context)
Description copied from interface:SequentialExecutionReporterCalled 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.- Specified by:
testInputGroupFinishedin interfaceSequentialExecutionReporter- Parameters:
context- the context of the group which was finished
-
faultCharacterizationStarted
public void faultCharacterizationStarted(TestInputGroupContext context, FaultCharacterizationAlgorithm algorithm)
Description copied from interface:SequentialExecutionReporterCalled if a fault characterization started for aTestInputGroup. The process will end again whenSequentialExecutionReporter.faultCharacterizationFinished(TestInputGroupContext, Map, Collection)is called.- Specified by:
faultCharacterizationStartedin 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> failureInducingCombinations)
Description copied from interface:SequentialExecutionReporterCalled if fault characterization for aTestInputGroupis 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:
faultCharacterizationFinishedin interfaceSequentialExecutionReporter- Parameters:
context- the context of the group for which fault characterization finishedexceptionInducingCombinations- all found exception-inducing combinationsfailureInducingCombinations- 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
-
printWarning
protected void printWarning(Collection<Combination> failureInducingCombinations)
template method implemented by sub-classes reporting found exception-inducing combinations- Parameters:
failureInducingCombinations- found failure-inducing combinations.
-
printExceptionInducingCombinations
protected void printExceptionInducingCombinations(Map<Combination,Class<? extends Throwable>> exceptionInducingCombinations)
template method implemented by sub-classes reporting found exception-inducing combinations- Parameters:
exceptionInducingCombinations- exception-inducing combinations to print together with exceptions.
-
faultCharacterizationTestInputsGenerated
public void faultCharacterizationTestInputsGenerated(TestInputGroupContext context, List<Combination> testInputs)
Description copied from interface:SequentialExecutionReporterCalled if additional test inputs for the fault characterization process of oneTestInputGrouphave 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:
faultCharacterizationTestInputsGeneratedin 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:ExecutionReporterIndicates the start of a test input execution.- Specified by:
testInputExecutionStartedin interfaceExecutionReporter- Parameters:
testInput- the started test input
-
testInputExecutionFinished
public void testInputExecutionFinished(Combination testInput, TestResult result)
Description copied from interface:ExecutionReporterIndicates the end of a test input execution.- Specified by:
testInputExecutionFinishedin 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:ExecutionReporterCalled if any algorithm made a report for and event not covered by any of the life cycle callback methods.- Specified by:
reportin interfaceExecutionReporter- Parameters:
level- the level of the report. Always higher than or equal toExecutionReporter.getReportLevel()report- the actual report with resolved arguments
-
-