InstrumentationTestRunner Class

Definition

Caution

This class is obsoleted in this android platform

An Instrumentation that runs various types of junit.framework.TestCases against an Android package (application).

[Android.Runtime.Register("android/test/InstrumentationTestRunner", DoNotGenerateAcw=true)]
[System.Obsolete("This class is obsoleted in this android platform")]
public class InstrumentationTestRunner : Android.App.Instrumentation
[<Android.Runtime.Register("android/test/InstrumentationTestRunner", DoNotGenerateAcw=true)>]
[<System.Obsolete("This class is obsoleted in this android platform")>]
type InstrumentationTestRunner = class
    inherit Instrumentation
Inheritance
InstrumentationTestRunner
Attributes

Remarks

Java documentation for android.test.InstrumentationTestRunner.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

InstrumentationTestRunner()
InstrumentationTestRunner(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

ReportKeyIdentifier

If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the class that is writing the report.

(Inherited from Instrumentation)
ReportKeyNameClass

If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the name of the current test class.

ReportKeyNameTest

If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the name of the current test.

ReportKeyNumCurrent

If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the sequence number of the current test.

ReportKeyNumTotal

If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the total number of tests that are being run.

ReportKeyStack

If included in the status bundle sent to an IInstrumentationWatcher, this key identifies a stack trace describing an error or failure.

ReportKeyStreamresult

If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies a string which can simply be printed to the output stream.

(Inherited from Instrumentation)
ReportValueId

This value, if stored with key android.app.Instrumentation#REPORT_KEY_IDENTIFIER, identifies InstrumentationTestRunner as the source of the report.

Properties

AllocCounts

Returns a bundle with the current results from the allocation counting.

(Inherited from Instrumentation)
Arguments

Get the arguments passed to this instrumentation.

BinderCounts

Returns a bundle with the counts for various binder counts for this process.

(Inherited from Instrumentation)
Class

Returns the runtime class of this Object.

(Inherited from Object)
ComponentName

Returns complete component name of this instrumentation.

(Inherited from Instrumentation)
Context

Return the Context of this instrumentation's package.

(Inherited from Instrumentation)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsProfiling

Check whether this instrumentation was started with profiling enabled.

(Inherited from Instrumentation)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Loader

Override this to provide access to the class loader of your package.

PeerReference (Inherited from Object)
ProcessName

Return the name of the process this instrumentation is running in.

(Inherited from Instrumentation)
TargetContext

Return a Context for the target application being instrumented.

(Inherited from Instrumentation)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

UiAutomation

Gets the UiAutomation instance with no flags set.

(Inherited from Instrumentation)

Methods

AcquireLooperManager(Looper)

Takes control of the execution of messages on the specified looper until TestLooperManager#release is called.

(Inherited from Instrumentation)
AddMonitor(Instrumentation+ActivityMonitor)

Add a new ActivityMonitor that will be checked whenever an activity is started.

(Inherited from Instrumentation)
AddMonitor(IntentFilter, Instrumentation+ActivityResult, Boolean)

Add a new ActivityMonitor that will be checked whenever an activity is started.

(Inherited from Instrumentation)
AddMonitor(String, Instrumentation+ActivityResult, Boolean)

Add a new ActivityMonitor that will be checked whenever an activity is started.

(Inherited from Instrumentation)
AddResults(Bundle)

Report some results in the middle of instrumentation execution.

(Inherited from Instrumentation)
CallActivityOnCreate(Activity, Bundle)

Perform calling of an activity's Activity#onCreate method.

(Inherited from Instrumentation)
CallActivityOnCreate(Activity, Bundle, PersistableBundle)

Perform calling of an activity's Activity#onCreate method.

(Inherited from Instrumentation)
CallActivityOnDestroy(Activity) (Inherited from Instrumentation)
CallActivityOnNewIntent(Activity, Intent)

Perform calling of an activity's Activity#onNewIntent method.

(Inherited from Instrumentation)
CallActivityOnPause(Activity)

Perform calling of an activity's Activity#onPause method.

(Inherited from Instrumentation)
CallActivityOnPictureInPictureRequested(Activity)

Perform calling of an activity's Activity#onPictureInPictureRequested method.

(Inherited from Instrumentation)
CallActivityOnPostCreate(Activity, Bundle)

Perform calling of an activity's Activity#onPostCreate method.

(Inherited from Instrumentation)
CallActivityOnPostCreate(Activity, Bundle, PersistableBundle)

Perform calling of an activity's Activity#onPostCreate method.

(Inherited from Instrumentation)
CallActivityOnRestart(Activity)

Perform calling of an activity's Activity#onRestart method.

(Inherited from Instrumentation)
CallActivityOnRestoreInstanceState(Activity, Bundle)

Perform calling of an activity's Activity#onRestoreInstanceState method.

(Inherited from Instrumentation)
CallActivityOnRestoreInstanceState(Activity, Bundle, PersistableBundle)

Perform calling of an activity's Activity#onRestoreInstanceState method.

(Inherited from Instrumentation)
CallActivityOnResume(Activity)

Perform calling of an activity's Activity#onResume method.

(Inherited from Instrumentation)
CallActivityOnSaveInstanceState(Activity, Bundle)

Perform calling of an activity's Activity#onSaveInstanceState method.

(Inherited from Instrumentation)
CallActivityOnSaveInstanceState(Activity, Bundle, PersistableBundle)

Perform calling of an activity's Activity#onSaveInstanceState method.

(Inherited from Instrumentation)
CallActivityOnStart(Activity)

Perform calling of an activity's Activity#onStart method.

(Inherited from Instrumentation)
CallActivityOnStop(Activity)

Perform calling of an activity's Activity#onStop method.

(Inherited from Instrumentation)
CallActivityOnUserLeaving(Activity)

Perform calling of an activity's Activity#onUserLeaveHint method.

(Inherited from Instrumentation)
CallApplicationOnCreate(Application)

Perform calling of the application's Application#onCreate method.

(Inherited from Instrumentation)
CheckMonitorHit(Instrumentation+ActivityMonitor, Int32)

Test whether an existing ActivityMonitor has been hit.

(Inherited from Instrumentation)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EndPerformanceSnapshot() (Inherited from Instrumentation)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Finish(Result, Bundle)

Terminate instrumentation of the application.

(Inherited from Instrumentation)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetUiAutomation(UiAutomationFlags)

Gets the UiAutomation instance with flags set.

(Inherited from Instrumentation)
InvokeContextMenuAction(Activity, Int32, MenuPerformFlags)

Show the context menu for the currently focused view and executes a particular context menu item.

(Inherited from Instrumentation)
InvokeMenuActionSync(Activity, Int32, MenuPerformFlags)

Execute a particular menu item.

(Inherited from Instrumentation)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
NewActivity(Class, Context, IBinder, Application, Intent, ActivityInfo, ICharSequence, Activity, String, Object)

Perform instantiation of an Activity object.

(Inherited from Instrumentation)
NewActivity(Class, Context, IBinder, Application, Intent, ActivityInfo, String, Activity, String, Object)

Perform instantiation of an Activity object.

(Inherited from Instrumentation)
NewActivity(ClassLoader, String, Intent)

Perform instantiation of the process's Activity object.

(Inherited from Instrumentation)
NewApplication(ClassLoader, String, Context)

Perform instantiation of the process's Application object.

(Inherited from Instrumentation)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OnCreate(Bundle)

Called when the instrumentation is starting, before any application code has been loaded.

(Inherited from Instrumentation)
OnDestroy()

Called when the instrumented application is stopping, after all of the normal application cleanup has occurred.

(Inherited from Instrumentation)
OnException(Object, Throwable)

This is called whenever the system captures an unhandled exception that was thrown by the application.

(Inherited from Instrumentation)
OnStart()

Method where the instrumentation thread enters execution.

(Inherited from Instrumentation)
RemoveMonitor(Instrumentation+ActivityMonitor)

Remove an ActivityMonitor that was previously added with #addMonitor.

(Inherited from Instrumentation)
RunOnMainSync(Action) (Inherited from Instrumentation)
RunOnMainSync(IRunnable)

Execute a call on the application's main thread, blocking until it is complete.

(Inherited from Instrumentation)
SendCharacterSync(Keycode)

Higher-level method for sending both the down and up key events for a particular character key code.

(Inherited from Instrumentation)
SendKeyDownUpSync(Keycode)

Sends an up and down key event sync to the currently focused window.

(Inherited from Instrumentation)
SendKeySync(KeyEvent)

Send a key event to the currently focused window/view and wait for it to be processed.

(Inherited from Instrumentation)
SendPointerSync(MotionEvent)

Dispatch a pointer event.

(Inherited from Instrumentation)
SendStatus(Result, Bundle)

Provide a status report about the application.

(Inherited from Instrumentation)
SendStringSync(String)

Sends the key events corresponding to the text to the app being instrumented.

(Inherited from Instrumentation)
SendTrackballEventSync(MotionEvent)

Dispatch a trackball event.

(Inherited from Instrumentation)
SetAutomaticPerformanceSnapshots() (Inherited from Instrumentation)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetInTouchMode(Boolean)

Force the global system in or out of touch mode.

(Inherited from Instrumentation)
Start()

Create and start a new thread in which to run instrumentation.

(Inherited from Instrumentation)
StartActivitySync(Intent)

Start a new activity and wait for it to begin running before returning.

(Inherited from Instrumentation)
StartActivitySync(Intent, Bundle)

Start a new activity and wait for it to begin running before returning.

(Inherited from Instrumentation)
StartAllocCounting()
Obsolete.
(Inherited from Instrumentation)
StartPerformanceSnapshot() (Inherited from Instrumentation)
StartProfiling()

This method will start profiling if isProfiling() returns true.

(Inherited from Instrumentation)
StopAllocCounting()
Obsolete.
(Inherited from Instrumentation)
StopProfiling()

Stops profiling if isProfiling() returns true.

(Inherited from Instrumentation)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

(Inherited from Object)
WaitForIdle(Action) (Inherited from Instrumentation)
WaitForIdle(IRunnable)

Schedule a callback for when the application's main thread goes idle (has no more events to process).

(Inherited from Instrumentation)
WaitForIdleSync()

Synchronously wait for the application to be idle.

(Inherited from Instrumentation)
WaitForMonitor(Instrumentation+ActivityMonitor)

Wait for an existing ActivityMonitor to be hit.

(Inherited from Instrumentation)
WaitForMonitorWithTimeout(Instrumentation+ActivityMonitor, Int64)

Wait for an existing ActivityMonitor to be hit till the timeout expires.

(Inherited from Instrumentation)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to