I'm trying to create tests using Espresso and Mockito
in order to do that, I have to add the following import:
import android.support.test.runner.AndroidJUnit4;
For some reason I'm getting "Cannot resolve symbol 'test'"
Any idea what could cause this? Am I missing a dependency?
(My gradle file contains, between the rest, the following dependencies):
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
I don't know if you solved this, but I realized I was on the release build variant, where the testing stuff doesn't work. I switched back to debug and everything was fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With