public class

TestRunnable

extends Object
implements Runnable
java.lang.Object
   ↳ android.support.test.orchestrator.TestRunnable

Class Overview

Runnable to run a single am instrument command to execute a single test.

Summary

Nested Classes
interface TestRunnable.RunFinishedListener Called at the end of a test run. 
Public Methods
static TestRunnable legacyTestRunnable(Context context, String secret, Bundle arguments, OutputStream outputStream, TestRunnable.RunFinishedListener listener)
Constructs a TestRunnable executes all tests in arguments.
void run()
static TestRunnable singleTestRunnable(Context context, String secret, Bundle arguments, OutputStream outputStream, TestRunnable.RunFinishedListener listener, String test)
Constructs a TestRunnable which will run a single test.
static TestRunnable testCollectionRunnable(Context context, String secret, Bundle arguments, OutputStream outputStream, TestRunnable.RunFinishedListener listener)
Constructs a TestRunnable which will ask the instrumentation to list out its tests.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Runnable

Public Methods

public static TestRunnable legacyTestRunnable (Context context, String secret, Bundle arguments, OutputStream outputStream, TestRunnable.RunFinishedListener listener)

Constructs a TestRunnable executes all tests in arguments.

Parameters
context Context: A context
secret String: A string representing the speakeasy binder key
arguments Bundle: contains arguments to be passed to the target instrumentation
outputStream OutputStream: the stream to write the results of the test process
listener TestRunnable.RunFinishedListener
Returns
TestRunnable

public void run ()

public static TestRunnable singleTestRunnable (Context context, String secret, Bundle arguments, OutputStream outputStream, TestRunnable.RunFinishedListener listener, String test)

Constructs a TestRunnable which will run a single test.

Parameters
context Context: A context
secret String: A string representing the speakeasy binder key
arguments Bundle: contains arguments to be passed to the target instrumentation
outputStream OutputStream: the stream to write the results of the test process
listener TestRunnable.RunFinishedListener
test String: contains a specific test#method to run. Will override whatever is specified in the bundle.
Returns
TestRunnable

public static TestRunnable testCollectionRunnable (Context context, String secret, Bundle arguments, OutputStream outputStream, TestRunnable.RunFinishedListener listener)

Constructs a TestRunnable which will ask the instrumentation to list out its tests.

Parameters
context Context: A context
secret String: A string representing the speakeasy binder key
arguments Bundle: contains arguments to be passed to the target instrumentation
outputStream OutputStream: the stream to write the results of the test process
listener TestRunnable.RunFinishedListener
Returns
TestRunnable