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

? Examples
AndroidTestRunner()
Public Methods

? Examples
void addTestListener( TestListener testListener)

? Examples
void clearTestListeners()

? Examples
List< TestCase> getTestCases()

? Examples
String getTestClassName()

? Examples
TestResult getTestResult()

? Examples
void runTest( TestResult testResult)

? Examples
void runTest()

? Examples
void setContext( Context context)

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

? Examples
void setInstrumentation( Instrumentation instrumentation)

? Examples
void setTest( Test test)

? Examples
void setTestClassName( String testClassName, String testMethodName)

? Examples
void testEnded( String testName)

? Examples
void testFailed(int status, Test test, Throwable t)

? Examples
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.

No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.