AndroidJUnit4


class AndroidJUnit4 : Runner, 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' argument.
  • Supports running tests on the application's UI Thread, for tests annotated with .

Usage @RunWith(AndroidJUnit4.class)

Summary

Public constructors

AndroidJUnit4(klass: Class<Any!>!)

Public functions

Unit
filter(filter: Filter!)
Description!
Unit
run(runNotifier: RunNotifier!)
Unit
sort(sorter: Sorter!)

Inherited functions

From org.junit.runner.Runner

Public constructors

AndroidJUnit4

AndroidJUnit4(klass: Class<Any!>!)

Public functions

getDescription

fun getDescription(): Description!

run

fun run(runNotifier: RunNotifier!): Unit

sort

fun sort(sorter: Sorter!): Unit