com.googlecode.lightest.core
Interface ILightestReporter

All Known Implementing Classes:
DefaultDetailsReporter, DefaultSummaryReporter, FailedReporterDecorator, LightestReporter, LightestReporterAdapter, PendingReporter, ReporterInvoker

public interface ILightestReporter

In contrast to the TestNG IReporter, which is intended to generate a single report after all tests have finished running, this interface defines a report that can be updated throughout the test run. generateBaseReport() is called to initialize the report, and some flavor of updateReport() is invoked both after a suite starts, and after each test finishes. A scheduled reporter always produces an accurate report, regardless of when it is run. Other types of reporters must be run at specific times to generate meaningful results. The ability to defer execution of a scheduled report provides flexibility to adjust the frequency of generation in view of performance considerations; reports can be quite heavy in this regard. Scheduling is indicated by calling setScheduled() with true.


Method Summary
 void generateBaseReport(TestRegistry testRegistry, String outputDir)
          Performs one-time setup activities for the report.
 int getCooldownFactor()
          Returns a factor by which the runtime of the report should be multipled by to obtain a cooldown period during which the report should not be updated.
 boolean isScheduled()
          Returns true if this reporter may be scheduled, false otherwise.
 void onUpdateDeferred()
          This callback should be invoked whenever an update to this reporter is intentionally skipped due the cooldown period not having fully elapsed.
 void setConfigText(String configText)
          Sets the textual configuration used to configure this run.
 void setScheduled(boolean scheduled)
          Sets whether this reporter can be scheduled.
 void updateReport(ISuite suite, TestRegistry testRegistry, String outputDir)
          Updates the report at the beginning of a new suite run.
 void updateReport(LightestTestResult result, TestRegistry testRegistry, List xmlSuites, List suites, String outputDirectory)
          Updates the report following the generation of a new test result.
 

Method Detail

setConfigText

void setConfigText(String configText)
Sets the textual configuration used to configure this run.

Parameters:
configText - the textual configuration, or null

generateBaseReport

void generateBaseReport(TestRegistry testRegistry,
                        String outputDir)
Performs one-time setup activities for the report.

Parameters:
testRegistry - the registry contains all known information about pending tests.
outputDir -

updateReport

void updateReport(ISuite suite,
                  TestRegistry testRegistry,
                  String outputDir)
Updates the report at the beginning of a new suite run.

Parameters:
suite - the suite that is about to run
testRegistry - the registry contains all known information about pending and completed tests
outputDir -

updateReport

void updateReport(LightestTestResult result,
                  TestRegistry testRegistry,
                  List xmlSuites,
                  List suites,
                  String outputDirectory)
Updates the report following the generation of a new test result. The signature conveniently accommodates IReporter implementations.

Parameters:
result - the result for which to update the report.
testRegistry - the registry contains all known information about pending and completed tests
xmlSuites -
suites -
outputDirectory -

isScheduled

boolean isScheduled()
Returns true if this reporter may be scheduled, false otherwise.


setScheduled

void setScheduled(boolean scheduled)
Sets whether this reporter can be scheduled.

Parameters:
scheduled -

getCooldownFactor

int getCooldownFactor()
Returns a factor by which the runtime of the report should be multipled by to obtain a cooldown period during which the report should not be updated. Non-positive values indicate no cooldown need be observed.


onUpdateDeferred

void onUpdateDeferred()
This callback should be invoked whenever an update to this reporter is intentionally skipped due the cooldown period not having fully elapsed.



Copyright © 2009. All Rights Reserved.