net.sf.jameleon.reporting
Class ResultsReporter

java.lang.Object
  extended by net.sf.jameleon.reporting.ResultsReporter
All Implemented Interfaces:
EventListener, TestCaseListener, TestRunListener

public class ResultsReporter
extends Object
implements TestCaseListener, TestRunListener

Writes the HTML results out to a file. This class writes both the main results as well as the individual testcase docs.


Method Summary
 void beginTestCase(TestCaseEvent event)
          Gets called before the execution of a test case
 void beginTestRun(TestRunEvent event)
          Gets called before the execution of a test run
static void clearInstance()
           
 void endTestCase(TestCaseEvent event)
          Gets called after the execution of a test case
 void endTestRun(TestRunEvent event)
          Gets called after the execution of a test suite
protected  void genTestCaseResultsDoc(TestCaseTag tct)
           
 TestRunReporter getHtmlTestRunReporter()
           
 TestRunSummaryReporter getHtmlTestRunSummaryReporter()
           
static ResultsReporter getInstance()
           
static File getResultsDir(File baseDir, Calendar c)
          Gets the timestamp formatted results directory
protected  File getResultsDirectoryForTestCase(TestCaseTag tct)
           
 TestRunReporter getSimpleTestRunReporter()
           
 Calendar getStartTime()
           
 TestCaseCounter getTestCaseCounter()
           
 void resetStats()
          Resets the test run stats (TestCaseCounter)
 void setHtmlTestRunReporter(TestRunReporter htmlTestRunReporter)
           
 void setHtmlTestRunSummaryReporter(TestRunSummaryReporter htmlTestRunSummaryReporter)
           
 void setSimpleTestRunReporter(TestRunReporter simpleTestRunReporter)
           
 void setStartTime(Calendar startTime)
           
 void setTestCaseCounter(TestCaseCounter counter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ResultsReporter getInstance()

clearInstance

public static void clearInstance()

getResultsDir

public static File getResultsDir(File baseDir,
                                 Calendar c)
Gets the timestamp formatted results directory

Parameters:
baseDir - - The director to use as the base or just '.'
c - - The date and time
Returns:
a file representing the directory to store the results to

getResultsDirectoryForTestCase

protected File getResultsDirectoryForTestCase(TestCaseTag tct)

genTestCaseResultsDoc

protected void genTestCaseResultsDoc(TestCaseTag tct)

resetStats

public void resetStats()
Resets the test run stats (TestCaseCounter)


beginTestCase

public void beginTestCase(TestCaseEvent event)
Description copied from interface: TestCaseListener
Gets called before the execution of a test case

Specified by:
beginTestCase in interface TestCaseListener
Parameters:
event - - a TestCaseEvent Object

endTestCase

public void endTestCase(TestCaseEvent event)
Description copied from interface: TestCaseListener
Gets called after the execution of a test case

Specified by:
endTestCase in interface TestCaseListener
Parameters:
event - - a TestCaseEvent Object

beginTestRun

public void beginTestRun(TestRunEvent event)
Description copied from interface: TestRunListener
Gets called before the execution of a test run

Specified by:
beginTestRun in interface TestRunListener
Parameters:
event - - a TestRunEvent Object

endTestRun

public void endTestRun(TestRunEvent event)
Description copied from interface: TestRunListener
Gets called after the execution of a test suite

Specified by:
endTestRun in interface TestRunListener
Parameters:
event - - a TestRunEvent Object

getStartTime

public Calendar getStartTime()

setStartTime

public void setStartTime(Calendar startTime)

getTestCaseCounter

public TestCaseCounter getTestCaseCounter()

setTestCaseCounter

public void setTestCaseCounter(TestCaseCounter counter)

getHtmlTestRunReporter

public TestRunReporter getHtmlTestRunReporter()

setHtmlTestRunReporter

public void setHtmlTestRunReporter(TestRunReporter htmlTestRunReporter)

getHtmlTestRunSummaryReporter

public TestRunSummaryReporter getHtmlTestRunSummaryReporter()

setHtmlTestRunSummaryReporter

public void setHtmlTestRunSummaryReporter(TestRunSummaryReporter htmlTestRunSummaryReporter)

getSimpleTestRunReporter

public TestRunReporter getSimpleTestRunReporter()

setSimpleTestRunReporter

public void setSimpleTestRunReporter(TestRunReporter simpleTestRunReporter)


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