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 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

public void clearTestListeners ()

Added in API level 1

public List<TestCase> getTestCases ()

Added in API level 1

public String getTestClassName ()

Added in API level 1

public TestResult getTestResult ()

Added in API level 1

public void runTest (TestResult testResult)

Added in API level 1

public void runTest ()

Added in API level 1

public void setContext (Context context)

Added in API level 1

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.

public void setInstrumentation (Instrumentation instrumentation)

Added in API level 5

public void setTest (Test test)

Added in API level 1

public void setTestClassName (String testClassName, String testMethodName)

Added in API level 1

public void testEnded (String testName)

Added in API level 1

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

Added in API level 1

public void testStarted (String testName)

Added in API level 1

Protected Methods

protected TestResult createTestResult ()

Added in API level 1

protected Class loadSuiteClass (String suiteClassName)

Added in API level 1

Returns the loaded Class for a suite name.

protected void runFailed (String message)

Added in API level 1

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