I'm trying to add instrumented test using Espresso in my android project.
I've added all necessary libs, besides adding AndroidJUnitRunner as the testInstrumentationRunner:
But for some reason, the imports are not working in instrumented test file:
But the local test file is getting the imports properly:
I've also added junit as androidTestImplementation, but makes no difference:
androidTestImplementation 'junit:junit:4.12'
This is why I cannot run the test file.
If I run the file anyway, I get this error:
Process finished with exit code 1
Class not found: "com.mcp.shippax.MainActivityEspressoTest"Empty test suite.
I cannot understand why this is happening (numerous grade syncs/invalidate caches/restarts), when the setup is so straight and simple.
I don't remember making any project changes other than converting most of my source files to Kotlin, including the test files. But later I reverted the test files back to java again.