Android APIs
public class

AndroidTestRunner

extends BaseTestRunner
java.lang.Object
   ↳ junit.runner.BaseTestRunner
     ↳ android.test.AndroidTestRunner

Summary

[Expand]
Inherited Constants
From class junit.runner.BaseTestRunner
Public Constructors
AndroidTestRunner()
Public Methods
void addTestListener(TestListener testListener)
void clearTestListeners()
List<TestCase> getTestCases()
String getTestClassName()
TestResult getTestResult()
void runTest(TestResult testResult)
void runTest()
void setContext(Context context)
void setInstrumentaiton(Instrumentation instrumentation)
This method was deprecated in API level 5. Incorrect spelling, use setInstrumentation(android.app.Instrumentation) instead.
void setInstrumentation(Instrumentation instrumentation)
void setTest(Test test)
void setTestClassName(String testClassName, String testMethodName)
void testEnded(String testName)
void testFailed(int status, Test test, Throwable t)
void testStarted(String testName)
Protected Methods
TestResult createTestResult()
Class loadSuiteClass(String suiteClassName)
Returns the loaded Class for a suite name.
void runFailed(String message)
Override to define how to handle a failed loading of a test suite.
[Expand]
Inherited Methods
From class junit.runner.BaseTestRunner
From class java.lang.Object
From interface junit.framework.TestListener

Public Constructors

public AndroidTestRunner ()

Added in API level 1

Public Methods

public void addTestListener (TestListener testListener)

Added in API level 1

Parameters
testListener TestListener

public void clearTestListeners ()

Added in API level 1

public List<TestCase> getTestCases ()

Added in API level 1

Returns
List<TestCase>

public String getTestClassName ()

Added in API level 1

Returns
String

public TestResult getTestResult ()

Added in API level 1

Returns
TestResult

public void runTest (TestResult testResult)

Added in API level 1

Parameters
testResult TestResult

public void runTest ()

Added in API level 1

public void setContext (Context context)

Added in API level 1

Parameters
context Context

public void setInstrumentaiton (Instrumentation instrumentation)

Added in API level 1

This method was deprecated in API level 5.
Incorrect spelling, use setInstrumentation(android.app.Instrumentation) instead.

Parameters
instrumentation Instrumentation

public void setInstrumentation (Instrumentation instrumentation)

Added in API level 5

Parameters
instrumentation Instrumentation

public void setTest (Test test)

Added in API level 1

Parameters
test Test

public void setTestClassName (String testClassName, String testMethodName)

Added in API level 1

Parameters
testClassName String
testMethodName String

public void testEnded (String testName)

Added in API level 1

Parameters
testName String

public void testFailed (int status, Test test, Throwable t)

Added in API level 1

Parameters
status int
test Test
t Throwable

public void testStarted (String testName)

Added in API level 1

Parameters
testName String

Protected Methods

protected TestResult createTestResult ()

Added in API level 1

Returns
TestResult

protected Class loadSuiteClass (String suiteClassName)

Added in API level 1

Returns the loaded Class for a suite name.

Parameters
suiteClassName String
Returns
Class
Throws
ClassNotFoundException

protected void runFailed (String message)

Added in API level 1

Override to define how to handle a failed loading of a test suite.

Parameters
message String