Deprecated in API level 24
AndroidTestRunner
public
class
AndroidTestRunner
extends BaseTestRunner
| java.lang.Object | ||
| ↳ | junit.runner.BaseTestRunner | |
| ↳ | android.test.AndroidTestRunner | |
This class was deprecated
in API level 24.
Use
AndroidJUnitRunner instead. New tests should be written using the
Android Testing Support Library.
Summary
Inherited constants |
|---|
Public constructors | |
|---|---|
AndroidTestRunner()
|
|
Public methods | |
|---|---|
void
|
addTestListener(TestListener testListener)
|
void
|
clearTestListeners()
|
List<TestCase>
|
getTestCases()
|
String
|
getTestClassName()
|
TestResult
|
getTestResult()
|
void
|
runTest()
|
void
|
runTest(TestResult testResult)
|
void
|
setContext(Context context)
|
void
|
setInstrumentaiton(Instrumentation instrumentation)
This method was deprecated
in API level 14.
Incorrect spelling,
use |
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<T>
|
loadSuiteClass(String suiteClassName)
|
void
|
runFailed(String message)
|
Inherited methods | |
|---|---|
Public constructors
AndroidTestRunner
public AndroidTestRunner ()
Public methods
addTestListener
Deprecated in API level 24
public void addTestListener (TestListener testListener)
| Parameters | |
|---|---|
testListener |
TestListener |
getTestCases
Deprecated in API level 24
public List<TestCase> getTestCases ()
| Returns | |
|---|---|
List<TestCase> |
|
runTest
Deprecated in API level 24
public void runTest (TestResult testResult)
| Parameters | |
|---|---|
testResult |
TestResult |
setContext
Deprecated in API level 24
public void setContext (Context context)
| Parameters | |
|---|---|
context |
Context |
setInstrumentaiton
Deprecated in API level 14
public void setInstrumentaiton (Instrumentation instrumentation)
This method was deprecated
in API level 14.
Incorrect spelling,
use setInstrumentation(android.app.Instrumentation) instead.
| Parameters | |
|---|---|
instrumentation |
Instrumentation |
setInstrumentation
Deprecated in API level 24
public void setInstrumentation (Instrumentation instrumentation)
| Parameters | |
|---|---|
instrumentation |
Instrumentation |
setTestClassName
Deprecated in API level 24
public void setTestClassName (String testClassName, String testMethodName)
| Parameters | |
|---|---|
testClassName |
String |
testMethodName |
String |
testEnded
Deprecated in API level 24
public void testEnded (String testName)
| Parameters | |
|---|---|
testName |
String |
testFailed
Deprecated in API level 24
public void testFailed (int status,
Test test,
Throwable t)| Parameters | |
|---|---|
status |
int |
test |
Test |
t |
Throwable |
testStarted
Deprecated in API level 24
public void testStarted (String testName)
| Parameters | |
|---|---|
testName |
String |
Protected methods
createTestResult
Deprecated in API level 24
protected TestResult createTestResult ()
| Returns | |
|---|---|
TestResult |
|
loadSuiteClass
Deprecated in API level 24
protected Class<T> loadSuiteClass (String suiteClassName)
| Parameters | |
|---|---|
suiteClassName |
String |
| Returns | |
|---|---|
Class<T> |
|
| Throws | |
|---|---|
ClassNotFoundException |
|
runFailed
Deprecated in API level 24
protected void runFailed (String message)
| Parameters | |
|---|---|
message |
String |