Class ReportService


  • public class ReportService
    extends Object
    Generates different Thucydides reports in a given output directory.
    • Constructor Detail

      • ReportService

        @Inject
        public ReportService​(Configuration configuration)
      • ReportService

        public ReportService​(File outputDirectory,
                             Collection<AcceptanceTestReporter> subscribedReporters,
                             Collection<AcceptanceTestFullReporter> subscribedFullReporters,
                             EnvironmentVariables environmentVariables)
        Reports are generated using the test results in a given directory. The actual reports are generated using a set of reporter objects. The report service passes test outcomes to the reporter objects, which generate different types of reports.
        Parameters:
        outputDirectory - Where the test data is stored, and where the generated reports will go.
        subscribedReporters - A set of reporters that generate the actual reports.
    • Method Detail

      • setOutputDirectory

        public void setOutputDirectory​(File outputDirectory)
      • useQualifier

        public void useQualifier​(String qualifier)
      • generateReportsFor

        public void generateReportsFor​(List<TestOutcome> testOutcomeResults)
        A test runner can generate reports via Reporter instances that subscribe to the test runner. The test runner tells the reporter what directory to place the reports in. Then, at the end of the test, the test runner notifies these reporters of the test outcomes. The reporter's job is to process each test run outcome and do whatever is appropriate.
        Parameters:
        testOutcomeResults - A list of test outcomes to use in report generation. These may be stored in memory (e.g. by a Listener instance) or read from the XML test results.
      • generateConfigurationsReport

        public void generateConfigurationsReport()
        Store some configuration properties under output directory
      • getDefaultReporters

        public static List<AcceptanceTestReporter> getDefaultReporters()
        The default reporters applicable for standard test runs.
      • getDefaultFullReporters

        public static List<AcceptanceTestFullReporter> getDefaultFullReporters()
        The default reporters applicable for standard test runs.