import static android.support.test.espresso.Espresso.onView;
import static android.support.test..assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import android.support.test.espresso.action.ViewActions;
@org.junit.runner.RunWith(android.support.test.runner.AndroidJUnit4.class) @android.test.suitebuilder.annotation.LargeTest
Build.gradle
dependencies {
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.3' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2' androidTestCompile 'com.android.support.test:rules:0.3' androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:22.1.0'
}
}
Q : I am trying to add imports in to a testing class . i have added all the required dependencies in build.gradle of project module .
it is an old project built into eclipse and now migrated to android studio project.
there is no androidTest folder in android studio project , so i manually crated src/androidTest/java/example/Test.java
Added Junit4 dependency too but still imports are not working .
Followed -: https://code.google.com/p/android-test-kit/wiki/EspressoSetupInstructions
any help would be appriciated .