Build 1.0_r1(from source)

android.test
Class PerformanceTestBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by android.test.PerformanceTestBase
All Implemented Interfaces:
PerformanceTestCase, Test

public abstract class PerformanceTestBase
extends TestCase
implements PerformanceTestCase

Not needed for SDK.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.test.PerformanceTestCase
PerformanceTestCase.Intermediates
 
Constructor Summary
PerformanceTestBase()
           
 
Method Summary
 boolean isPerformanceOnly()
          This method is used to determine what modes this test case can run in.
 int startPerformance(PerformanceTestCase.Intermediates intermediates)
          Set up to begin performance tests.
 void testRun()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PerformanceTestBase

public PerformanceTestBase()
Method Detail

startPerformance

public int startPerformance(PerformanceTestCase.Intermediates intermediates)
Description copied from interface: PerformanceTestCase
Set up to begin performance tests. The 'intermediates' is a communication channel to send back intermediate performance numbers -- if you use it, you will probably want to ensure your test is only executed once by returning 1. Otherwise, return 0 to allow the test harness to decide the number of iterations.

If you return a non-zero iteration count, you should call intermediates.startTiming and intermediates.endTiming to report the duration of the test whose performance should actually be measured.

Specified by:
startPerformance in interface PerformanceTestCase
Parameters:
intermediates - Callback for sending intermediate results.
Returns:
int Maximum number of iterations to run, or 0 to let the caller decide.

isPerformanceOnly

public boolean isPerformanceOnly()
Description copied from interface: PerformanceTestCase
This method is used to determine what modes this test case can run in.

Specified by:
isPerformanceOnly in interface PerformanceTestCase
Returns:
true if this test case can only be run in performance mode.

testRun

public void testRun()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature