-
public final class AndroidJUnit5Builder extends RunnerBuilderCustom RunnerBuilder hooked into the main Test Instrumentation Runner provided by the Android Test Support Library, which allows to run the JUnit Platform for instrumented tests. With this, the default JUnit 4-based Runner for Android instrumented tests is, in a way, tricked into detecting JUnit Jupiter tests as well.
The RunnerBuilder is added to the instrumentation runner through a custom "testInstrumentationRunnerArgument" in the build.gradle script:
<pre> android { defaultConfig { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArgument("runnerBuilder", "de.mannodermaus.junit5.AndroidJUnit5Builder") } } </pre>(Suppressing unused, since this is hooked into the project configuration via a Test Instrumentation Runner Argument.)
-
-
Constructor Summary
Constructors Constructor Description AndroidJUnit5Builder()
-
Method Summary
Modifier and Type Method Description RunnerrunnerForClass(Class<?> testClass)-
-
Method Detail
-
runnerForClass
Runner runnerForClass(Class<?> testClass)
-
-
-
-