| java.lang.Object |
| ↳ |
org.junit.runner.Runner |
| |
↳ |
androidx.test.ext.junit.runners.AndroidJUnit4 |
Class Overview
A JUnit4 runner for Android tests.
This runner offers several features on top of the standard JUnit4 runner,
- Supports running on Robolectric. This implementation will delegate to RobolectricTestRunner
if test is running in Robolectric enviroment. A custom runner can be provided by specifying
the full class name in a 'android.junit.runner' system property.
- Supports a per-test timeout - specfied via a 'timeout_msec'
ERROR(/androidx.test.runner.AndroidJUnitRunner) argument.
- Supports running tests on the application's UI Thread, for tests annotated with
ERROR(/UiThreadTest).
Usage @RunWith(AndroidJUnit4.class)
Summary
|
[Expand]
Inherited Methods |
From class
org.junit.runner.Runner
|
abstract
Description
|
getDescription()
|
|
abstract
void
|
run(RunNotifier arg0)
|
|
int
|
testCount()
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
From interface
org.junit.runner.Describable
|
abstract
Description
|
getDescription()
|
|
From interface
org.junit.runner.manipulation.Filterable
|
abstract
void
|
filter(Filter arg0)
|
|
From interface
org.junit.runner.manipulation.Sortable
|
abstract
void
|
sort(Sorter arg0)
|
|
Public Constructors
public
AndroidJUnit4
(Class<?> klass)
| Throws |
InitializationError |
|
Public Methods
public
void
filter
(Filter filter)
| Throws |
NoTestsRemainException |
|
public
Description
getDescription
()
public
void
run
(RunNotifier runNotifier)
| Parameters |
runNotifier |
RunNotifier |
public
void
sort
(Sorter sorter)