InstrumentationArgsRunner

open class InstrumentationArgsRunner(forwardedArguments: Set<String>) : AndroidJUnitRunner(source)

An AndroidJUnitRunner that copies selected instrumentation arguments to system properties before tests start, so app code that reads System.getProperty (for example a base URL override) sees values passed with -e or testInstrumentationRunnerArguments.

class AppTestRunner : InstrumentationArgsRunner(setOf("MOCK_SERVER_BASE_URL"))

Parameters

forwardedArguments

The argument names to copy.

Constructors

Link copied to clipboard
constructor(forwardedArguments: Set<String>)

Properties

Link copied to clipboard
open val allocCounts: Bundle?
Link copied to clipboard
open val binderCounts: Bundle?
Link copied to clipboard
Link copied to clipboard
open val context: Context?
Link copied to clipboard
Link copied to clipboard
open val processName: String?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun addResults(results: Bundle?)
Link copied to clipboard
open fun callActivityOnCreate(activity: Activity?, icicle: Bundle?, persistentState: PersistableBundle?)
open fun callActivityOnCreate(activity: Activity?, bundle: Bundle?)
Link copied to clipboard
open fun callActivityOnDestroy(activity: Activity?)
Link copied to clipboard
open fun callActivityOnNewIntent(activity: Activity?, intent: Intent?)
open fun callActivityOnNewIntent(activity: Activity, intent: Intent, caller: ComponentCaller)
Link copied to clipboard
open fun callActivityOnPause(activity: Activity?)
Link copied to clipboard
open fun callActivityOnPostCreate(activity: Activity, savedInstanceState: Bundle?)
open fun callActivityOnPostCreate(activity: Activity, savedInstanceState: Bundle?, persistentState: PersistableBundle?)
Link copied to clipboard
open fun callActivityOnRestart(activity: Activity?)
Link copied to clipboard
open fun callActivityOnRestoreInstanceState(activity: Activity, savedInstanceState: Bundle)
open fun callActivityOnRestoreInstanceState(activity: Activity, savedInstanceState: Bundle?, persistentState: PersistableBundle?)
Link copied to clipboard
open fun callActivityOnResume(activity: Activity?)
Link copied to clipboard
open fun callActivityOnSaveInstanceState(activity: Activity, outState: Bundle)
open fun callActivityOnSaveInstanceState(activity: Activity, outState: Bundle, outPersistentState: PersistableBundle)
Link copied to clipboard
open fun callActivityOnStart(activity: Activity?)
Link copied to clipboard
open fun callActivityOnStop(activity: Activity?)
Link copied to clipboard
open fun callActivityOnUserLeaving(activity: Activity?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun execStartActivities(who: Context?, contextThread: IBinder?, token: IBinder?, target: Activity?, intents: Array<out Intent?>?, options: Bundle?)
Link copied to clipboard
open fun execStartActivity(who: Context?, contextThread: IBinder?, token: IBinder?, target: Activity?, intent: Intent?, requestCode: Int): Instrumentation.ActivityResult?
open fun execStartActivity(who: Context?, contextThread: IBinder?, token: IBinder?, target: Activity?, intent: Intent?, requestCode: Int, options: Bundle?): Instrumentation.ActivityResult?
open fun execStartActivity(who: Context?, contextThread: IBinder?, token: IBinder?, target: Fragment?, intent: Intent?, requestCode: Int, options: Bundle?): Instrumentation.ActivityResult?
open fun execStartActivity(who: Context?, contextThread: IBinder?, token: IBinder?, target: String?, intent: Intent?, requestCode: Int, options: Bundle?): Instrumentation.ActivityResult?
open fun execStartActivity(who: Context?, contextThread: IBinder?, token: IBinder?, target: Activity?, intent: Intent?, requestCode: Int, options: Bundle?, user: UserHandle?): Instrumentation.ActivityResult?
Link copied to clipboard
open fun finish(resultCode: Int, results: Bundle?)
Link copied to clipboard
open fun getUiAutomation(flags: Int): UiAutomation?
Link copied to clipboard
open fun interceptActivityUsing(interceptingActivityFactory: InterceptingActivityFactory?)
Link copied to clipboard
open fun invokeContextMenuAction(targetActivity: Activity?, id: Int, flag: Int): Boolean
Link copied to clipboard
open fun invokeMenuActionSync(targetActivity: Activity?, id: Int, flag: Int): Boolean
Link copied to clipboard
open fun newActivity(cl: ClassLoader?, className: String?, intent: Intent?): Activity?
open fun newActivity(clazz: Class<*>?, context: Context?, token: IBinder?, application: Application?, intent: Intent?, info: ActivityInfo?, title: CharSequence?, parent: Activity?, id: String?, lastNonConfigurationInstance: Any?): Activity?
Link copied to clipboard
open fun newApplication(cl: ClassLoader?, className: String?, context: Context?): Application?
Link copied to clipboard
open override fun onCreate(arguments: Bundle?)
Link copied to clipboard
open fun onDestroy()
Link copied to clipboard
open fun onException(obj: Any?, e: Throwable?): Boolean
Link copied to clipboard
Link copied to clipboard
open fun onStart()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun resetInTouchMode()
Link copied to clipboard
open fun runOnMainSync(runnable: Runnable?)
Link copied to clipboard
open fun sendCharacterSync(keyCode: Int)
Link copied to clipboard
open fun sendKeyDownUpSync(keyCode: Int)
Link copied to clipboard
open fun sendKeySync(event: KeyEvent?)
Link copied to clipboard
open fun sendPointerSync(event: MotionEvent?)
Link copied to clipboard
open fun sendStatus(resultCode: Int, results: Bundle?)
Link copied to clipboard
open fun sendStringSync(text: String?)
Link copied to clipboard
Link copied to clipboard
open fun setInTouchMode(inTouch: Boolean)
Link copied to clipboard
open fun start()
Link copied to clipboard
open fun startActivitySync(intent: Intent, options: Bundle?): Activity
open fun startActivitySync(intent: Intent?): Activity?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun startProfiling()
Link copied to clipboard
Link copied to clipboard
open fun stopProfiling()
Link copied to clipboard
open fun waitForIdle(recipient: Runnable?)
Link copied to clipboard
open fun waitForIdleSync()
Link copied to clipboard
Link copied to clipboard