org.apache.qpid.junit.extensions
Interface InstrumentedTest

All Superinterfaces:
junit.framework.Test
All Known Implementing Classes:
AsymptoticTestCase

public interface InstrumentedTest
extends junit.framework.Test

An InstrumentedTest is one which can supply some additional instrumentation on top of the pass/fail/error behaviour of normal junit tests. Tests implementing this interface must additionally supply information about how long they took to run and how much memory they used.

CRC Card
Responsibilities
Report test run time.
Report test memory usage.


Method Summary
 long getTestEndMemory()
          Reports the memory usage at the end of the test.
 long getTestStartMemory()
          Reports the memory usage at the start of the test.
 long getTestTime()
          Reports how long the test took to run.
 void reset()
          Resets the instrumentation values to zero, and nulls any references to held measurements so that the memory can be reclaimed.
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Method Detail

getTestTime

long getTestTime()
Reports how long the test took to run.

Returns:
The time in milliseconds that the test took to run.

getTestStartMemory

long getTestStartMemory()
Reports the memory usage at the start of the test.

Returns:
The memory usage at the start of the test.

getTestEndMemory

long getTestEndMemory()
Reports the memory usage at the end of the test.

Returns:
The memory usage at the end of the test.

reset

void reset()
Resets the instrumentation values to zero, and nulls any references to held measurements so that the memory can be reclaimed.



Licensed to the Apache Software Foundation