AndroidJUnit4
Artifact: androidx.test.ext:junit
public final class AndroidJUnit4 extends Runner implements Filterable, Sortable
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'
androidx.test.runner.AndroidJUnitRunnerargument. - Supports running tests on the application's UI Thread, for tests annotated with
androidx.test.annotation.UiThreadTest.
Usage @RunWith(AndroidJUnit4.class)
Summary
Public constructors |
|---|
AndroidJUnit4(Class<Object> klass) |
Public methods |
|
|---|---|
void |
|
Description |
|
void |
run(RunNotifier runNotifier) |
void |
Inherited methods |
||
|---|---|---|
|