AndroidJUnit4

public final class AndroidJUnit4
extends Runner implements Filterable, Sortable

java.lang.Object
   ↳ org.junit.runner.Runner
     ↳ androidx.test.ext.junit.runners.AndroidJUnit4


A cross environment JUnit4 runner for Android tests.

This implementation will delegate to the appropriate runner based on the build-system provided value. A custom runner can be provided by specifying the full class name in a 'android.junit.runner' system property.

Usage @RunWith(AndroidJUnit4.class)

Summary

Public constructors

AndroidJUnit4(Class<?> klass)

Public methods

void filter(Filter filter)
Description getDescription()
void run(RunNotifier runNotifier)
void sort(Sorter sorter)

Inherited methods

From class org.junit.runner.Runner
From class java.lang.Object
From interface org.junit.runner.Describable
From interface org.junit.runner.manipulation.Filterable
From interface org.junit.runner.manipulation.Sortable

Public constructors

AndroidJUnit4

AndroidJUnit4 (Class<?> klass)

Parameters
klass Class

Throws
InitializationError

Public methods

filter

void filter (Filter filter)

Parameters
filter Filter

Throws
NoTestsRemainException

getDescription

Description getDescription ()

Returns
Description

run

void run (RunNotifier runNotifier)

Parameters
runNotifier RunNotifier

sort

void sort (Sorter sorter)

Parameters
sorter Sorter