to top
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 is deprecated. 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 ()

Since: API Level 1

Public Methods

public void addTestListener (TestListener testListener)

Since: API Level 1

public void clearTestListeners ()

Since: API Level 1

public List<TestCase> getTestCases ()

Since: API Level 1

public String getTestClassName ()

Since: API Level 1

public TestResult getTestResult ()

Since: API Level 1

public void runTest (TestResult testResult)

Since: API Level 1

public void runTest ()

Since: API Level 1

public void setContext (Context context)

Since: API Level 1

public void setInstrumentaiton (Instrumentation instrumentation)

Since: API Level 1

This method is deprecated.
Incorrect spelling, use setInstrumentation(android.app.Instrumentation) instead.

public void setInstrumentation (Instrumentation instrumentation)

Since: API Level 5

public void setTest (Test test)

Since: API Level 1

public void setTestClassName (String testClassName, String testMethodName)

Since: API Level 1

public void testEnded (String testName)

Since: API Level 1

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

Since: API Level 1

public void testStarted (String testName)

Since: API Level 1

Protected Methods

protected TestResult createTestResult ()

Since: API Level 1

protected Class loadSuiteClass (String suiteClassName)

Since: API Level 1

Returns the loaded Class for a suite name.

protected void runFailed (String message)

Since: API Level 1

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