@Deprecated public class InstrumentationCoreTestRunner extends InstrumentationTestRunner
onCreate(Bundle)
method and sets the system properties necessary
for many core tests to run. This is needed because there are some core tests
that need writing access to the file system. We also need to set the harness
Thread's context ClassLoader. Otherwise some classes and resources will not
be found. Finally, we add a means to free memory allocated by a TestCase
after its execution.Instrumentation.ActivityMonitor, Instrumentation.ActivityResult, Instrumentation.UiAutomationFlags
ARGUMENT_DELAY_MSEC, ARGUMENT_TEST_CLASS, ARGUMENT_TEST_PACKAGE, ARGUMENT_TEST_SIZE_PREDICATE, REPORT_KEY_NAME_CLASS, REPORT_KEY_NAME_TEST, REPORT_KEY_NUM_CURRENT, REPORT_KEY_NUM_TOTAL, REPORT_KEY_STACK, REPORT_VALUE_ID, REPORT_VALUE_RESULT_ERROR, REPORT_VALUE_RESULT_FAILURE, REPORT_VALUE_RESULT_OK, REPORT_VALUE_RESULT_START
REPORT_KEY_IDENTIFIER, REPORT_KEY_STREAMRESULT
Constructor and Description |
---|
InstrumentationCoreTestRunner()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected AndroidTestRunner |
getAndroidTestRunner()
Deprecated.
|
void |
onCreate(Bundle arguments)
Deprecated.
Called when the instrumentation is starting, before any application code
has been loaded.
|
addTestListener, getAllTests, getArguments, getLoader, getTestSuite, onStart
addMonitor, addMonitor, addMonitor, callActivityOnCreate, callActivityOnCreate, callActivityOnDestroy, callActivityOnNewIntent, callActivityOnNewIntent, callActivityOnPause, callActivityOnPostCreate, callActivityOnPostCreate, callActivityOnRestart, callActivityOnRestoreInstanceState, callActivityOnRestoreInstanceState, callActivityOnResume, callActivityOnSaveInstanceState, callActivityOnSaveInstanceState, callActivityOnStart, callActivityOnStop, callActivityOnUserLeaving, callApplicationOnCreate, checkMonitorHit, checkStartActivityResult, endPerformanceSnapshot, execStartActivities, execStartActivitiesAsUser, execStartActivity, execStartActivity, execStartActivity, execStartActivityAsCaller, execStartActivityFromAppTask, finish, getAllocCounts, getBinderCounts, getComponentName, getContext, getTargetContext, getUiAutomation, getUiAutomation, invokeContextMenuAction, invokeMenuActionSync, isProfiling, newActivity, newActivity, newApplication, newApplication, onDestroy, onException, removeMonitor, runOnMainSync, sendCharacterSync, sendKeyDownUpSync, sendKeySync, sendPointerSync, sendStatus, sendStringSync, sendTrackballEventSync, setAutomaticPerformanceSnapshots, setInTouchMode, start, startActivitySync, startAllocCounting, startPerformanceSnapshot, startProfiling, stopAllocCounting, stopProfiling, waitForIdle, waitForIdleSync, waitForMonitor, waitForMonitorWithTimeout
public void onCreate(Bundle arguments)
Instrumentation
Instrumentation.start()
to begin the instrumentation thread, which will then
continue execution in Instrumentation.onStart()
.
If you do not need your own thread -- that is you are writing your
instrumentation to be completely asynchronous (returning to the event
loop so that the application can run), you can simply begin your
instrumentation here, for example call Context.startActivity(android.content.Intent)
to
begin the appropriate first activity of the application.
onCreate
in class InstrumentationTestRunner
arguments
- Any additional arguments that were supplied when the
instrumentation was started.protected AndroidTestRunner getAndroidTestRunner()
getAndroidTestRunner
in class InstrumentationTestRunner