net.thucydides.core.reports
Class ReportService

Package class diagram package ReportService
java.lang.Object
  extended by net.thucydides.core.reports.ReportService

public class ReportService
extends Object

Generates different Thucydides reports in a given output directory.


Constructor Summary
ReportService(Configuration configuration)
           
ReportService(File outputDirectory, Collection<AcceptanceTestReporter> subscribedReporters)
          Reports are generated using the test results in a given directory.
 
Method Summary
 void generateReportsFor(List<TestOutcome> testOutcomeResults)
          A test runner can generate reports via Reporter instances that subscribe to the test runner.
static List<AcceptanceTestReporter> getDefaultReporters()
          The default reporters applicable for standard test runs.
 List<AcceptanceTestReporter> getSubscribedReporters()
           
 void subscribe(AcceptanceTestReporter reporter)
           
 void useQualifier(String qualifier)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportService

@Inject
public ReportService(Configuration configuration)

ReportService

public ReportService(File outputDirectory,
                     Collection<AcceptanceTestReporter> subscribedReporters)
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

getSubscribedReporters

public List<AcceptanceTestReporter> getSubscribedReporters()

subscribe

public void subscribe(AcceptanceTestReporter reporter)

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.

getDefaultReporters

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

Returns:
a list of default reporters.


Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.