I\'m having trouble importing some of the Android UI testing framework classes - I just can\'t figure out what is going wrong!
This is my class:
@Run
For writing UI tests((tests that run on Android Device/Emulator)) in Android, make sure that
The Test classes are in androidTest package rather that test package.
Make sure you make the following dependencies in build.gradle
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.2.0' androidTestImplementation 'androidx.test.ext:junit:1.1.1' testImplementation 'junit:junit:4.13'
For Unit Testing(tests that run on JVM) make sure
1.Test classes are in test package
2.Make sure you make the following dependencies in build.gradle
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:2.23.0'