AndroidJUnit4

public final class AndroidJUnit4
extends Runner implements Filterable, Sortable

java.lang.Object
   ↳ org.junit.runner.Runner
     ↳ android.support.test.runner.AndroidJUnit4


Aliases the current default Android JUnit 4 class runner, for future-proofing. If future versions of JUnit change the default Runner class, they will also change the definition of this class. Developers wanting to explicitly tag a class as an Android JUnit 4 class should use @RunWith(AndroidJUnit4.class)

Summary

Public constructors

AndroidJUnit4(Class<?> klass, AndroidRunnerParams runnerParams)

Constructs a new instance of the default runner

AndroidJUnit4(Class<?> klass)

Used when executed with standard junit runner.

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, 
                AndroidRunnerParams runnerParams)

Constructs a new instance of the default runner

Parameters
klass Class

runnerParams AndroidRunnerParams

Throws
InitializationError

AndroidJUnit4

AndroidJUnit4 (Class<?> klass)

Used when executed with standard junit runner. Will attempt to delegate to RobolectricTestRunner or delegate provided by android.junit.runner system property.

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