The InstrumentationTestCase class
The InstrumentationTestCase class is the direct or indirect base class for various test cases that have access to Instrumentation. This is the list of the most important direct and indirect subclasses:
ActivityTestCaseProviderTestCase2<T extends ContentProvider>SingleLaunchActivityTestCase<T extends Activity>SyncBaseInstrumentationActivityInstrumentationTestCase2<T extends Activity>ActivityUnitTestCase<T extends Activity>
The InstrumentationTestCase class is in the android.test package, and extends junit.framework.TestCase, which extends junit.framework.Assert.
The launchActivity and launchActivityWithIntent methods
These utility methods are used to launch Activities from a test. If the Intent is not specified using the second option, a default Intent is used:
public final T launchActivity (String pkg, Class<T> activityCls, Bundle extras)
Note
The template class parameter T is used in activityCls and as the return type...