UiAutomatorInstrumentationTestRunner


public class UiAutomatorInstrumentationTestRunner extends InstrumentationTestRunner


Test runner for UiAutomatorTestCases. Such tests are executed on the device and have access to an applications context.

Summary

Public constructors

Protected methods

AndroidTestRunner

This method is deprecated.

void

Perform initialization specific to UiAutomator test.

Inherited Constants

From android.app.Instrumentation
static final String
static final String
From android.test.InstrumentationTestRunner
static final String

This field is deprecated.

static final String

This field is deprecated.

static final String

This field is deprecated.

static final String

This field is deprecated.

static final String

This field is deprecated.

static final String
REPORT_VALUE_ID = "InstrumentationTestRunner"

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

Inherited methods

From android.app.Instrumentation
TestLooperManager
void
Instrumentation.ActivityMonitor
addMonitor(
    IntentFilter filter,
    Instrumentation.ActivityResult result,
    boolean block
)
void
addResults(Bundle results)
void
callActivityOnCreate(Activity activity, Bundle icicle)
void
void
void
void
void
callActivityOnPostCreate(Activity activity, Bundle savedInstanceState)
void
void
callActivityOnRestoreInstanceState(
    Activity activity,
    Bundle savedInstanceState
)
void
void
void
void
void
void
boolean
void
void
finish(int resultCode, Bundle results)
Bundle
Bundle
ComponentName
Context
String
Context
UiAutomation
boolean
invokeContextMenuAction(Activity targetActivity, int id, int flag)
boolean
invokeMenuActionSync(Activity targetActivity, int id, int flag)
boolean
Activity
newActivity(
    Class<Object> clazz,
    Context context,
    IBinder token,
    Application application,
    Intent intent,
    ActivityInfo info,
    CharSequence title,
    Activity parent,
    String id,
    Object lastNonConfigurationInstance
)
Application
newApplication(ClassLoader cl, String className, Context context)
void
boolean
void
void
void
void
sendCharacterSync(int keyCode)
void
sendKeyDownUpSync(int keyCode)
void
void
void
sendStatus(int resultCode, Bundle results)
void
void
void
void
setInTouchMode(boolean inTouch)
void
Activity
void

This method is deprecated.

void
void
void

This method is deprecated.

void
void
waitForIdle(Runnable recipient)
void
Activity
Activity
waitForMonitorWithTimeout(
    Instrumentation.ActivityMonitor monitor,
    long timeOut
)
From android.test.InstrumentationTestRunner
void

This method is deprecated.

TestSuite

This method is deprecated.

Bundle

This method is deprecated.

ClassLoader

This method is deprecated.

TestSuite

This method is deprecated.

void
onCreate(Bundle arguments)

This method is deprecated.

void

This method is deprecated.

Public constructors

UiAutomatorInstrumentationTestRunner

Added in 2.2.0
Deprecated in 2.3.0
public UiAutomatorInstrumentationTestRunner()

Protected methods

getAndroidTestRunner

Added in 2.2.0
Deprecated in 2.3.0
protected AndroidTestRunner getAndroidTestRunner()

initializeUiAutomatorTest

Added in 2.2.0
Deprecated in 2.3.0
protected void initializeUiAutomatorTest(UiAutomatorTestCase test)

Perform initialization specific to UiAutomator test. It sets up the test case so that it can access the UiDevice and gives it access to the command line arguments.

Parameters
UiAutomatorTestCase test

UiAutomatorTestCase to initialize.