Class PrintStreamExecutionReporter
- java.lang.Object
-
- de.rwth.swc.coffee4j.model.report.PrintStreamExecutionReporter
-
- All Implemented Interfaces:
ExecutionReporter
public class PrintStreamExecutionReporter extends java.lang.Object implements ExecutionReporter
An example implementation of aExecutionReporter. Will print to anyPrintStreamorSystem.outby default.
-
-
Constructor Summary
Constructors Constructor Description PrintStreamExecutionReporter()Creates a new reporter printing all events toSystem.out.PrintStreamExecutionReporter(java.io.PrintStream printStream)Creates a new reporter printing all events to the given stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfaultCharacterizationFinished(TestInputGroupContext context, java.util.List<Combination> failureInducingCombinations)Called if fault characterization for aTestInputGroupis completely finished.voidfaultCharacterizationStarted(TestInputGroupContext context, de.rwth.swc.coffee4j.engine.characterization.FaultCharacterizationAlgorithm algorithm)Called if a fault characterization started for aTestInputGroup.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 toExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm).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.voidtestInputExecutionFinished(Combination testInput, de.rwth.swc.coffee4j.engine.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, java.util.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.model.report.ExecutionReporter
getReportLevel
-
-
-
-
Constructor Detail
-
PrintStreamExecutionReporter
public PrintStreamExecutionReporter()
Creates a new reporter printing all events toSystem.out.
-
PrintStreamExecutionReporter
public PrintStreamExecutionReporter(java.io.PrintStream printStream)
Creates a new reporter printing all events to the given stream.- Parameters:
printStream- the stream to which events are printed. Must not benull
-
-
Method Detail
-
testInputGroupGenerated
public void testInputGroupGenerated(TestInputGroupContext context, java.util.List<Combination> testInputs)
Description copied from interface:ExecutionReporterCalled if a newTestInputGrouphas been generated by aTestInputGroupGenerator. The generator is given inside theTestInputGroupContext.- Specified by:
testInputGroupGeneratedin interfaceExecutionReporter- Parameters:
context- all important information about one grouptestInputs- the initially generated test inputs
-
testInputGroupFinished
public void testInputGroupFinished(TestInputGroupContext context)
Description copied from interface:ExecutionReporterCalled 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 interfaceExecutionReporter- Parameters:
context- the context of the group which was finished
-
faultCharacterizationStarted
public void faultCharacterizationStarted(TestInputGroupContext context, de.rwth.swc.coffee4j.engine.characterization.FaultCharacterizationAlgorithm algorithm)
Description copied from interface:ExecutionReporterCalled if a fault characterization started for aTestInputGroup. The process will end again whenExecutionReporter.faultCharacterizationFinished(TestInputGroupContext, List)is called.- Specified by:
faultCharacterizationStartedin interfaceExecutionReporter- 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, java.util.List<Combination> failureInducingCombinations)
Description copied from interface:ExecutionReporterCalled if fault characterization for aTestInputGroupis completely finished. This meansExecutionReporter.faultCharacterizationTestInputsGenerated(TestInputGroupContext, List)will never be called again for this context, and soon after this methodExecutionReporter.testInputGroupFinished(TestInputGroupContext)is called.- Specified by:
faultCharacterizationFinishedin interfaceExecutionReporter- 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
public void faultCharacterizationTestInputsGenerated(TestInputGroupContext context, java.util.List<Combination> testInputs)
Description copied from interface:ExecutionReporterCalled if additional test inputs for the fault characterization process of oneTestInputGrouphave been generated by the algorithm given toExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm). This method can only be called (multiple times) between calls toExecutionReporter.faultCharacterizationStarted(TestInputGroupContext, FaultCharacterizationAlgorithm)andExecutionReporter.faultCharacterizationFinished(TestInputGroupContext, List).- Specified by:
faultCharacterizationTestInputsGeneratedin interfaceExecutionReporter- 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, de.rwth.swc.coffee4j.engine.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(de.rwth.swc.coffee4j.engine.report.ReportLevel level, de.rwth.swc.coffee4j.engine.report.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
-
-