android-junit5
android-junit5 copied to clipboard
ActivityScenarioExtension launch keeps getting null .
hello
We conducted the activity test by referring to the site below.
https://github.com/mannodermaus/android-junit5/wiki/Writing-an-Activity-Test
But I keep getting no further progress with NullPointExecption on that line.
val scenario = scenarioExtension.scenario
All basic gradle configuration has been done.
I'm attaching it in case you don't know. This is my app level gradle. //test code gradle testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
androidTestImplementation 'de.mannodermaus.junit5:android-test-core:1.3.0'
androidTestRuntimeOnly 'de.mannodermaus.junit5:android-test-runner:1.3.0'
testImplementation 'io.mockk:mockk:1.12.4'
testImplementation 'io.mockk:mockk-agent-jvm:1.12.4'
androidTestImplementation 'io.mockk:mockk-android:1.12.4'
androidTestImplementation 'io.mockk:mockk-agent-jvm:1.12.4'
What am I missing? Any other examples for testing your activity?
For reference, if you proceed with Junit4, it works normally.
please let me know what i'm missing