net.sf.jbenchmark.util
Class BasicTestStatistics

java.lang.Object
  extended bynet.sf.jbenchmark.TestFeature
      extended bynet.sf.jbenchmark.util.BasicTestStatistics
All Implemented Interfaces:
TestListener

public class BasicTestStatistics
extends TestFeature
implements TestListener

The basic test statistics is a more basic version from the TestTimer that reports on more generic items for all types of tests, not just web ones.

Version:
$Id: BasicTestStatistics.java,v 1.5 2004/07/02 01:11:34 twpatkua Exp $
Author:
Patrick Kua

Field Summary
static java.text.Format[] COLUMN_FORMATS
          Standard formats for the basic test statistics.
static java.lang.String[] HEADINGS
          Standard headings for the basic test statistics.
static java.text.DecimalFormat STANDARD_DECIMAL_FORMAT
          Format numbers to three decimal spots.
static java.text.DateFormat STANDARD_TIME_FORMAT
          Standard time format for reporting of times and not dates.
 
Constructor Summary
BasicTestStatistics()
           
 
Method Summary
 void finish()
          Report all results when we have finished.
 void testFailed(Test test, java.lang.Throwable throwable)
          For this we want to count the numnber of test failures.
 void testFinished(TestResult result)
          Further accumulate the statistics for the next test result.
 void testStart(Test test)
          When a test is started, we don't need to monitor anything.
 
Methods inherited from class net.sf.jbenchmark.TestFeature
getContext, getName, setContext, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STANDARD_DECIMAL_FORMAT

public static final java.text.DecimalFormat STANDARD_DECIMAL_FORMAT
Format numbers to three decimal spots.


STANDARD_TIME_FORMAT

public static final java.text.DateFormat STANDARD_TIME_FORMAT
Standard time format for reporting of times and not dates.


COLUMN_FORMATS

public static final java.text.Format[] COLUMN_FORMATS
Standard formats for the basic test statistics.


HEADINGS

public static final java.lang.String[] HEADINGS
Standard headings for the basic test statistics.

Constructor Detail

BasicTestStatistics

public BasicTestStatistics()
Method Detail

testStart

public void testStart(Test test)
When a test is started, we don't need to monitor anything.

Specified by:
testStart in interface TestListener

testFailed

public void testFailed(Test test,
                       java.lang.Throwable throwable)
For this we want to count the numnber of test failures.

Specified by:
testFailed in interface TestListener

testFinished

public void testFinished(TestResult result)
Further accumulate the statistics for the next test result.

Specified by:
testFinished in interface TestListener

finish

public void finish()
            throws java.lang.Exception
Report all results when we have finished.

Overrides:
finish in class TestFeature
Throws:
java.lang.Exception