Android 2.3 Gingerbread

Package android.test

A framework for writing Android test cases and suites.

See:
          Description

Interface Summary
PerformanceCollectorTestCase A simple interface for passing in a PerformanceResultsWriter instance to be used with PerformanceCollector.
PerformanceTestCase More complex interface performance for test cases.
PerformanceTestCase.Intermediates Callbacks for PerformanceTestCase.
TestBrowserController  
TestBrowserView  
TestCase Deprecated.
TestRunner.Listener Support class that receives status on test progress.
TestRunnerView  
TestSuiteProvider Implementors will know how to get a test suite.
 

Class Summary
ActivityInstrumentationTestCase<T extends Activity> Deprecated. new tests should be written using ActivityInstrumentationTestCase2, which provides more options for configuring the Activity under test
ActivityInstrumentationTestCase2<T extends Activity> This class provides functional testing of a single activity.
ActivityTestCase This is common code used to support Activity test cases.
ActivityUnitTestCase<T extends Activity> This class provides isolated testing of a single activity.
AndroidTestCase Extend this if you need to access Resources or other things that depend on Activity Context.
AndroidTestRunner  
ApplicationTestCase<T extends Application> This test case provides a framework in which you can test Application classes in a controlled environment.
BundlePrinter Subclass of ResultPrinter that adds test case results to a bundle.
BundleTestListener A TestListener that adds test case results to a bundle.
ClassPathPackageInfo The Package object doesn't allow you to iterate over the contained classes and subpackages of that package.
ClassPathPackageInfoSource Generate ClassPathPackageInfos by scanning apk paths.
DatabaseTestUtils A collection of utilities for writing unit tests for database code.
InstrumentationCoreTestRunner This test runner extends the default InstrumentationTestRunner.
InstrumentationTestCase A test case that has access to Instrumentation.
InstrumentationTestRunner An Instrumentation that runs various types of TestCases against an Android package (application).
InstrumentationTestSuite A TestSuite that injects Instrumentation into InstrumentationTestCase before running them.
InstrumentationUtils The InstrumentationUtils class has all the utility functions needed for instrumentation tests.
IsolatedContext A mock context which prevents its users from talking to the rest of the device while stubbing enough methods to satify code that tries to talk to other packages.
LaunchPerformanceBase Base class for all launch performance Instrumentation classes.
MoreAsserts Contains additional assertion methods not found in JUnit.
NoExecTestResult A benign test result that does no actually test execution, just runs through the motions Not needed for SDK.
PackageInfoSources Not needed for SDK.
PerformanceTestBase Not needed for SDK.
ProviderTestCase<T extends ContentProvider> Deprecated. this class extends InstrumentationTestCase but should extend AndroidTestCase.
ProviderTestCase2<T extends ContentProvider> This test case class provides a framework for testing a single ContentProvider and for testing your app code with an isolated content provider.
RenamingDelegatingContext This is a class which delegates to the given context, but performs database and file operations with a renamed database/file name (prefixes default names with a given prefix).
ServiceLocator  
ServiceTestCase<T extends Service> This test case provides a framework in which you can test Service classes in a controlled environment.
SimpleCache<K,V>  
SingleLaunchActivityTestCase<T extends Activity> If you would like to test a single activity with an InstrumentationTestCase, this provides some of the boiler plate to launch and finish the activity in SingleLaunchActivityTestCase.setUp() and SingleLaunchActivityTestCase.tearDown().
SyncBaseInstrumentation If you would like to test sync a single provider with an InstrumentationTestCase, this provides some of the boiler plate in SyncBaseInstrumentation.setUp() and InstrumentationTestCase.tearDown().
TestBrowserActivity  
TestBrowserControllerImpl  
TestCaseUtil  
TestListActivity Activity base class to use to implement your application's tests.
TestPrinter Prints the test progress to stdout.
TestRecorder Not needed for 1.0 SDK.
TestRunner Support class that actually runs a test.
TestRunner.IntermediateTime Listener.performance() 'intermediates' argument is a list of these.
TouchUtils Reusable methods for generating touch events.
ViewAsserts Some useful assertions about views.
 

Error Summary
AssertionFailedError Thrown when an assertion failed.
ComparisonFailure Thrown when an assert equals for Strings failed.
 

Annotation Types Summary
FlakyTest This annotation can be used on an InstrumentationTestCase's test methods.
TimedTest This annotation can be used on an TestCase's test methods.
UiThreadTest This annotation can be used on an InstrumentationTestCase's test methods.
 

Package android.test Description

A framework for writing Android test cases and suites.


Android 2.3 Gingerbread