Share via


ActivityManager.IsRunningInUserTestHarness Property

Definition

Returns "true" if the device is running in Test Harness Mode.

public static bool IsRunningInUserTestHarness { [Android.Runtime.Register("isRunningInUserTestHarness", "()Z", "", ApiSince=29)] get; }
[<get: Android.Runtime.Register("isRunningInUserTestHarness", "()Z", "", ApiSince=29)>]
static member IsRunningInUserTestHarness : bool

Property Value

Attributes

Remarks

Returns "true" if the device is running in Test Harness Mode.

Test Harness Mode is a feature that allows devices to run without human interaction in a device farm/testing harness (such as Firebase Test Lab). You should check this method if you want your app to behave differently when running in a test harness to skip setup screens that would impede UI testing. e.g. a keyboard application that has a full screen setup page for the first time it is launched.

Note that you should <em>not</em> use this to determine whether or not your app is running an instrumentation test, as it is not set for a standard device running a test.

Java documentation for android.app.ActivityManager.isRunningInUserTestHarness().

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.

Applies to