net.sf.jameleon.reporting
Class HtmlTestRunSummaryReporter

java.lang.Object
  extended by net.sf.jameleon.reporting.HtmlTestRunSummaryReporter
All Implemented Interfaces:
TestRunSummaryReporter

public class HtmlTestRunSummaryReporter
extends Object
implements TestRunSummaryReporter

Reports on all script results in a given test run as a summary in HTML. The current implementation reports a single result as an HTML table row.


Field Summary
static String DEFAULT_HEADER_TEMPLATE
           
static String DEFAULT_RESULT_BEGIN_ROW_TEMPLATE
           
static String DEFAULT_RESULT_ROW_TEMPLATE
           
 
Constructor Summary
HtmlTestRunSummaryReporter()
           
 
Method Summary
 void cleanUp()
          Cleans up any resources used
 void extractResources()
           
 String getTestRunBeginResultRowTemplate()
          Gets the template to be used when the test run is started
 String getTestRunResultRowTemplate()
          Gets the template for the invidual test script result
 String getTestRunSummaryResultsHeaderTemplate()
          Gets the template for the test run results header file
 Writer getWriter()
          Gets the Writer to use to write to results to
 boolean isPrintHeader()
          Tells whether the header should be printed or not
 void printHeader()
           
 void reportTestRunComplete(Calendar startTime, Calendar endTime, TestCaseCounter counter)
          Reports the completion of a test run.
 void reportTestRunStart(Calendar startTime)
          Reports the start of a test run.
 void setPrintHeader(boolean printHeader)
          Sets the print header option
 void setTestRunBeginResultRowTemplate(String testRunBeginResultRowTemplate)
          Sets the template to be used when the test run is started
 void setTestRunResultRowTemplate(String testRunResultRowTemplate)
          Sets the template for the invidual test script result
 void setTestRunSummaryResultsHeaderTemplate(String testRunSummaryResultsHeaderTemplate)
          Sets the template for the test run results header file
 void setWriter(Writer writer)
          Sets the Writer to use to write to results to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HEADER_TEMPLATE

public static final String DEFAULT_HEADER_TEMPLATE
See Also:
Constant Field Values

DEFAULT_RESULT_ROW_TEMPLATE

public static final String DEFAULT_RESULT_ROW_TEMPLATE
See Also:
Constant Field Values

DEFAULT_RESULT_BEGIN_ROW_TEMPLATE

public static final String DEFAULT_RESULT_BEGIN_ROW_TEMPLATE
See Also:
Constant Field Values
Constructor Detail

HtmlTestRunSummaryReporter

public HtmlTestRunSummaryReporter()
Method Detail

extractResources

public void extractResources()

printHeader

public void printHeader()

reportTestRunStart

public void reportTestRunStart(Calendar startTime)
Description copied from interface: TestRunSummaryReporter
Reports the start of a test run.

Specified by:
reportTestRunStart in interface TestRunSummaryReporter
Parameters:
startTime - The time the test run was kicked off

reportTestRunComplete

public void reportTestRunComplete(Calendar startTime,
                                  Calendar endTime,
                                  TestCaseCounter counter)
Description copied from interface: TestRunSummaryReporter
Reports the completion of a test run.

Specified by:
reportTestRunComplete in interface TestRunSummaryReporter
Parameters:
startTime - The time the test run began
endTime - The time the test run was completed
counter - The number of test cases run passed and failed.

cleanUp

public void cleanUp()
Description copied from interface: TestRunSummaryReporter
Cleans up any resources used

Specified by:
cleanUp in interface TestRunSummaryReporter

getWriter

public Writer getWriter()
Description copied from interface: TestRunSummaryReporter
Gets the Writer to use to write to results to

Specified by:
getWriter in interface TestRunSummaryReporter
Returns:
The Writer to use to write to results to

setWriter

public void setWriter(Writer writer)
Description copied from interface: TestRunSummaryReporter
Sets the Writer to use to write to results to

Specified by:
setWriter in interface TestRunSummaryReporter
Parameters:
writer - The Writer to use to write to results to

isPrintHeader

public boolean isPrintHeader()
Tells whether the header should be printed or not

Specified by:
isPrintHeader in interface TestRunSummaryReporter
Returns:
true if the header should be printed

setPrintHeader

public void setPrintHeader(boolean printHeader)
Sets the print header option

Specified by:
setPrintHeader in interface TestRunSummaryReporter
Parameters:
printHeader - true if the header should be printed

getTestRunBeginResultRowTemplate

public String getTestRunBeginResultRowTemplate()
Gets the template to be used when the test run is started

Returns:
The template to be used when the test run is started

setTestRunBeginResultRowTemplate

public void setTestRunBeginResultRowTemplate(String testRunBeginResultRowTemplate)
Sets the template to be used when the test run is started

Parameters:
testRunBeginResultRowTemplate - The template to be used when the test run is started

getTestRunSummaryResultsHeaderTemplate

public String getTestRunSummaryResultsHeaderTemplate()
Gets the template for the test run results header file

Returns:
The test run results template

setTestRunSummaryResultsHeaderTemplate

public void setTestRunSummaryResultsHeaderTemplate(String testRunSummaryResultsHeaderTemplate)
Sets the template for the test run results header file

Parameters:
testRunSummaryResultsHeaderTemplate - The test run results template

getTestRunResultRowTemplate

public String getTestRunResultRowTemplate()
Gets the template for the invidual test script result

Returns:
The template for the invidual test script result

setTestRunResultRowTemplate

public void setTestRunResultRowTemplate(String testRunResultRowTemplate)
Sets the template for the invidual test script result

Parameters:
testRunResultRowTemplate - The template for the invidual test script result


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.