Interface ExecutionReporter

  • All Known Implementing Classes:
    NoExecutionReporter, PrintStreamExecutionReporter

    public interface ExecutionReporter
    The InputParameterModel-based equivalent to a GenerationReporter. Instead of TestInputGroups this uses TestInputGroupContexts so that identifies can be converted using ArgumentConverters. 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 per TestInputGroupContext, as caching results in some tests getting executed for multiple TestInputGroupContexts.

    All methods have empty default implementations so that each implementing class can choose what methods to override.

    • Method Detail

      • testInputGroupGenerated

        default void testInputGroupGenerated​(TestInputGroupContext context,
                                             java.util.List<Combination> testInputs)
        Called if a new TestInputGroup has been generated by a TestInputGroupGenerator. The generator is given inside the TestInputGroupContext.
        Parameters:
        context - all important information about one group
        testInputs - the initially generated test inputs
      • testInputGroupFinished

        default void testInputGroupFinished​(TestInputGroupContext context)
        Called if a TestInputGroup 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.
        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 a TestInputGroup. The process will end again when faultCharacterizationFinished(TestInputGroupContext, List) is called.
        Parameters:
        context - the context of the group for which fault characterization started
        algorithm - 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 a TestInputGroup is completely finished. This means faultCharacterizationTestInputsGenerated(TestInputGroupContext, List) will never be called again for this context, and soon after this method testInputGroupFinished(TestInputGroupContext) is called.
        Parameters:
        context - the context of the group for which fault characterization finished
        failureInducingCombinations - 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
      • 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 input
        result - 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 higher ReportLevel will be passed to report(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 to getReportLevel()
        report - the actual report with resolved arguments