net.thucydides.core.reports.html
Class HtmlReporter

Package class diagram package HtmlReporter
java.lang.Object
  extended by net.thucydides.core.reports.ThucydidesReporter
      extended by net.thucydides.core.reports.html.HtmlReporter
Direct Known Subclasses:
HtmlAcceptanceTestReporter, HtmlAggregateStoryReporter, HtmlProgressReporter, HtmlRequirementsReporter

public abstract class HtmlReporter
extends ThucydidesReporter

An HTML report generates reports in a given directory and uses resources (images,...) from another.

Author:
johnsmart

Nested Class Summary
protected  class HtmlReporter.Merger
           
 
Field Summary
protected static String TIMESTAMP_FORMAT
           
 
Constructor Summary
HtmlReporter()
           
HtmlReporter(EnvironmentVariables environmentVariables)
           
 
Method Summary
protected  void addTimestamp(TestOutcome testOutcome, Map<String,Object> context)
           
protected  void copyResourcesToOutputDirectory()
           
protected  void copyTestResultsToOutputDirectory()
           
protected  EnvironmentVariables getEnvironmentVariables()
           
 String getResourceDirectory()
           
protected  HtmlReporter.Merger mergeTemplate(String templateFile)
           
 void setResourceDirectory(String resourceDirectory)
          Resources such as CSS stylesheets or images.
protected  String timestampFrom(org.joda.time.DateTime startTime)
           
protected  String timestampFrom(TestOutcomes rootOutcomes)
           
protected  File writeReportToOutputDirectory(String reportFilename, String htmlContents)
          Write the actual HTML report to a file with the specified name in the output directory.
 
Methods inherited from class net.thucydides.core.reports.ThucydidesReporter
getOutputDirectory, getSourceDirectory, setOutputDirectory, setSourceDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMESTAMP_FORMAT

protected static final String TIMESTAMP_FORMAT
See Also:
Constant Field Values
Constructor Detail

HtmlReporter

public HtmlReporter()

HtmlReporter

public HtmlReporter(EnvironmentVariables environmentVariables)
Method Detail

setResourceDirectory

public void setResourceDirectory(String resourceDirectory)
Resources such as CSS stylesheets or images.


getResourceDirectory

public String getResourceDirectory()

getEnvironmentVariables

protected EnvironmentVariables getEnvironmentVariables()

copyResourcesToOutputDirectory

protected void copyResourcesToOutputDirectory()
                                       throws IOException
Throws:
IOException

copyTestResultsToOutputDirectory

protected void copyTestResultsToOutputDirectory()
                                         throws IOException
Throws:
IOException

writeReportToOutputDirectory

protected File writeReportToOutputDirectory(String reportFilename,
                                            String htmlContents)
                                     throws IOException
Write the actual HTML report to a file with the specified name in the output directory.

Throws:
IOException

timestampFrom

protected String timestampFrom(TestOutcomes rootOutcomes)

timestampFrom

protected String timestampFrom(org.joda.time.DateTime startTime)

addTimestamp

protected void addTimestamp(TestOutcome testOutcome,
                            Map<String,Object> context)

mergeTemplate

protected HtmlReporter.Merger mergeTemplate(String templateFile)


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